kauth: Remove unused assignments to bp
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Feb 2013 15:11:33 +0000 (15:11 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Feb 2013 06:09:05 +0000 (22:09 -0800)
We never use the character pointer once we've advanced it past the
slash, so don't bother doing the work of advancing it.

Caught by clang-analyzer

Change-Id: I8ea561d6756685a13892f0635fa2e19b3f1233ab
Reviewed-on: http://gerrit.openafs.org/9171
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/kauth/kkids.c

index 3439f63..90d9b1e 100644 (file)
@@ -178,14 +178,12 @@ find_me(char *arg, char *parent_dir)
         */
        strncpy(parent_dir, truename, bp - truename);
        parent_dir[bp - truename] = 0;
-       bp++;                   /*Skip the slash */
     } else {
        /*
         * No slash appears in the given file name.  Set parent_dir to the current
         * directory, and the last component as the given name.
         */
        strcpy(parent_dir, ".");
-       bp = truename;
     }
 
     return 1;                  /* found it */