[PATCH 2/3] missing ret values

From: Brad Barden <brad_AT_13os.net>
Date: Tue, 17 Nov 2015 14:06:09 -0600

---
 readlink.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/readlink.c b/readlink.c
index e2e2f22..10418ac 100644
--- a/readlink.c
+++ b/readlink.c
_AT_@ -30,11 +30,13 @@ realpathm(const char * path, char * resolvedpath) {
 
 	if (!*p) {
 		errno = ENOENT;
+		ret = NULL;
 		goto badpath;
 	}
 
 	if (strnlen(path, PATH_MAX) == PATH_MAX) {
 		errno = ENAMETOOLONG;
+		ret = NULL;
 		goto badpath;
 	}
 
_AT_@ -43,6 +45,7 @@ realpathm(const char * path, char * resolvedpath) {
 	} else { 
 		if (!realpath(".", a)) {
 			weprintf("realpath '.':");
+			ret = NULL;
 			goto badpath;
 		}
 	}
_AT_@ -53,6 +56,7 @@ realpathm(const char * path, char * resolvedpath) {
 		while (*p && *p != '/') {
 			if (i >= PATH_MAX) {
 				errno = ENAMETOOLONG;
+				ret = NULL;
 				goto badpath;
 			}
 			a[i++] = *p++;
_AT_@ -90,6 +94,7 @@ realpathm(const char * path, char * resolvedpath) {
 				++m;
 			} else {
 				weprintf("realpathm '%s':", a);
+				ret = NULL;
 				goto badpath;
 			}
 		} else {
_AT_@ -103,6 +108,7 @@ realpathm(const char * path, char * resolvedpath) {
 		}
 		if (a[i-1] != '/' && strlcat(a, "/", PATH_MAX) >= PATH_MAX) {
 			errno = ENAMETOOLONG;
+			ret = NULL;
 			goto badpath;
 		}
 	}
-- 
2.3.6
--hcut4fGOf7Kh6EdG
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0003-remove-unnessecary-assignment.patch"
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Wed Nov 18 2015 - 02:24:17 CET