aboutsummaryrefslogtreecommitdiffstats
path: root/src/unistd
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-21 12:52:26 +0100
committerMattias Andrée <maandree@kth.se>2016-03-21 12:52:26 +0100
commitd98ae6e5142f6db8b52bd3539fca18a3bb6c1412 (patch)
tree33a0fd039f024a3ece8badb5acdbed28d7a9b749 /src/unistd
parentupdate todo (diff)
downloadslibc-d98ae6e5142f6db8b52bd3539fca18a3bb6c1412.tar.gz
slibc-d98ae6e5142f6db8b52bd3539fca18a3bb6c1412.tar.bz2
slibc-d98ae6e5142f6db8b52bd3539fca18a3bb6c1412.tar.xz
Fix issue #11 on github
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/unistd')
-rw-r--r--src/unistd/searchpath3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unistd/searchpath3.c b/src/unistd/searchpath3.c
index d66cfaf..222f77a 100644
--- a/src/unistd/searchpath3.c
+++ b/src/unistd/searchpath3.c
@@ -138,13 +138,13 @@ char* searchpath3(const char* name, const char* fallback, const char* first)
free(path);
free(pathname);
- return errno = (eacces ? EACCES : ENOENT), -1;
+ return errno = (eacces ? EACCES : ENOENT), NULL;
fail:
saved_errno = errno;
free(path);
free(pathname);
errno = saved_errno;
- return -1;
+ return NULL;
}