From fe9f4a93183c972225541b1ebf5ed5b5f484adff Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Sun, 3 Mar 2013 21:14:22 -0500 Subject: [PATCH] afscp: Fix check for bare root.cell dirs in dynroot mode A previous fix (git commit fb1d7491fbe2e90300b23284f213cac2bdcd56ac) added a check for '!p' in gettoproot(), but p is always a non-NULL pointer (in part since it's dereferenced just above in the code), so the check is always false. Instead, I suspect the original author intended to check for '!*p', which this patch does. Change-Id: I1c0a2dd1d582a6b5e82275db18474343efa679a2 Reviewed-on: http://gerrit.openafs.org/9337 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/libafscp/afscp_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libafscp/afscp_dir.c b/src/libafscp/afscp_dir.c index b3d42b1c9..f5470f5bd 100644 --- a/src/libafscp/afscp_dir.c +++ b/src/libafscp/afscp_dir.c @@ -370,7 +370,7 @@ gettoproot(struct afscp_cell *cell, char *p, char **q, r = p; while (*r && *r != '/') r++; - if (!*r && !p) { + if (!*r && !*p) { afscp_errno = ENODEV; return 1; } -- 2.39.5