From d98ae6e5142f6db8b52bd3539fca18a3bb6c1412 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 21 Mar 2016 12:52:26 +0100 Subject: Fix issue #11 on github MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/unistd/searchpath3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/unistd') 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; } -- cgit v1.2.3-70-g09d2