aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-06-24 21:16:13 +0200
committerMattias Andrée <maandree@kth.se>2023-06-24 21:16:13 +0200
commit563dbfc3cae4a711fb3676a9c8005aeeef8c6e31 (patch)
treea638920f1e0ca1bbdd0a300f5ad6a443867cfdef
parentArgument 3 and 4 are swapped on SPARC for PTRACE_GETREGS and PTRACE_SETREGS (diff)
downloadsctrace-563dbfc3cae4a711fb3676a9c8005aeeef8c6e31.tar.gz
sctrace-563dbfc3cae4a711fb3676a9c8005aeeef8c6e31.tar.bz2
sctrace-563dbfc3cae4a711fb3676a9c8005aeeef8c6e31.tar.xz
return explicit NULL rather than 0
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index b6abe3e..d5b50b7 100644
--- a/memory.c
+++ b/memory.c
@@ -26,7 +26,7 @@ get_string(pid_t pid, unsigned long int addr, size_t *lenp, const char **errorp)
*errorp = errno == EFAULT ? "<invalid address>" : "<an error occured during reading of string>";
*lenp = 0;
free(out);
- return 0;
+ return NULL;
}
p = memchr(&out[off], 0, read_size);
if (p) {