kauth: Remove unused lclpw structure from klog
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Feb 2013 15:09:41 +0000 (15:09 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Feb 2013 06:08:24 +0000 (22:08 -0800)
klog assigns into, but never references, the lclpw structure. Just
remove it.

Caught by clang-analyzer

Change-Id: I8e94f97ee3ee6cb15193ad80dd9aef39e6f8490b
Reviewed-on: http://gerrit.openafs.org/9170
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/klog.c

index 3c273ad..ea15360 100644 (file)
@@ -158,7 +158,6 @@ CommandProc(struct cmd_syndesc *as, void *arock)
 
     struct passwd pwent;
     struct passwd *pw = &pwent;
-    struct passwd *lclpw = &pwent;
     char passwd[BUFSIZ];
 
     static char rn[] = "klog"; /*Routine name */
@@ -269,7 +268,6 @@ CommandProc(struct cmd_syndesc *as, void *arock)
            foundExplicitCell = 1;
            strncpy(realm, cell, sizeof(realm));
        }
-       lclpw->pw_name = name;
     } else {
        /* No explicit name provided: use Unix uid. */
        pw = getpwuid(getuid());
@@ -282,7 +280,6 @@ CommandProc(struct cmd_syndesc *as, void *arock)
            }
            KLOGEXIT(KABADARGUMENT);
        }
-       lclpw = pw;
     }
 
     if (as->parms[aPASSWORD].items) {