aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_util.c
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2015-01-15 16:13:45 -0600
committerPeter Seebach <peter.seebach@windriver.com>2015-01-15 16:13:45 -0600
commit4e1c00d04637f21a7da5f465a34b653d2705e443 (patch)
tree7b9099793498d530492033e6d781c45429e8a64c /pseudo_util.c
parent09238273dacb81bbc92c7d42986ef4e5fadf4a86 (diff)
downloadpseudo-4e1c00d04637f21a7da5f465a34b653d2705e443.tar.gz
pseudo-4e1c00d04637f21a7da5f465a34b653d2705e443.tar.bz2
pseudo-4e1c00d04637f21a7da5f465a34b653d2705e443.zip
Clean up the path allocation a bit more
Having the same logic twice was sorta bugging me. Now the function-like-macro is sorta bugging me, and I'll just let it.
Diffstat (limited to 'pseudo_util.c')
-rw-r--r--pseudo_util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pseudo_util.c b/pseudo_util.c
index d15373b..7f21164 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -1286,8 +1286,15 @@ pseudo_etc_file(const char *file, char *realname, int flags, const char **search
}
for (i = 0; i < dircount; ++i) {
const char *s = search_dirs[i];
+ /* we used to pass in some paths as NULL when unset,
+ * so we skipped those. Now NULL entries don't get
+ * put in, so the only NULL should be the sentinel
+ * value, and this should never get hit.
+ *
+ * "should" is not comforting to me.
+ */
if (!s)
- continue;
+ break;
#if PSEUDO_PORT_DARWIN
/* special magic: empty string implies our emulation
* of the passwd/group files.