]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Remove pointless assignments
authorPat Riehecky <riehecky@fnal.gov>
Fri, 25 May 2018 17:03:35 +0000 (12:03 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 8 Jun 2018 12:52:08 +0000 (08:52 -0400)
scan-build identified these var assignements as being unused or redundant.

Reviewed-on: https://gerrit.openafs.org/13086
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e71985bce593e9dba43443e084eb726fcc5259e3)

Change-Id: Ic93c5e775f13a8f75ba619391d71cb78f4dc06ae
Reviewed-on: https://gerrit.openafs.org/13150
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: PatRiehecky <jcpunk@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/LINUX/osi_sleep.c
src/rx/rx_rdwr.c
src/uss/uss_fs.c
src/viced/callback.c
src/volser/vsprocs.c

index 07bb7fed145c5610ba3a61553dbc494baf3946d3..cdf22115fee9c007fb7b895f2ca43731cd6f5f20 100644 (file)
@@ -140,7 +140,7 @@ int
 afs_osi_SleepSig(void *event)
 {
     struct afs_event *evp;
-    int seq, retval;
+    int seq;
     int code;
 
     evp = afs_getevent(event);
@@ -150,7 +150,6 @@ afs_osi_SleepSig(void *event)
     }
 
     seq = evp->seq;
-    retval = 0;
 
     AFS_GUNLOCK();
     code = wait_event_freezable(evp->cond, seq != evp->seq);
index 1d1257c9166a4467f30ac067daa8849e73d1cd92..9deff7592d258b068a5f4fafc451861f95f3f7a3 100644 (file)
@@ -1017,7 +1017,7 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
 #ifdef RX_TRACK_PACKETS
     struct opr_queue *cursor;
 #endif
-    int nextio;
+    int nextio = 0;
     int requestCount;
     struct opr_queue tmpq;
 #ifdef RXDEBUG_PACKET
@@ -1025,7 +1025,6 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
 #endif
 
     requestCount = nbytes;
-    nextio = 0;
 
     MUTEX_ENTER(&call->lock);
     if (call->error) {
@@ -1062,7 +1061,6 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
      * to send. Set RX_PROTOCOL_ERROR if any problems are found in
      * the iovec. We put the loop condition at the end to ensure that
      * a zero length write will push a short packet. */
-    nextio = 0;
     opr_queue_Init(&tmpq);
 #ifdef RXDEBUG_PACKET
     tmpqc = 0;
index 06937d5c12d92f0a10a085f124d084ff4c3f36dd..11cda30db925b17eda2fa15177c4af79346c9c00 100644 (file)
@@ -579,7 +579,7 @@ uss_fs_UnlogToken(char *celln)
               code);
        exit(1);
     }
-    for (code = index = 0; index < count; index++) {
+    for (index = 0; index < count; index++) {
        tp = tokenInfoP + index;
        if (!(tp->deleted)) {
            code = ktc_SetToken(&tp->service, &tp->token, &tp->client, 0);
index 0b3fc35b2822bbbd093d258091cc1ad7006c9389..f685398fbec4f7bc1d2ef534a9fffa792d37aac7 100644 (file)
@@ -1121,7 +1121,6 @@ BreakDelayedCallBacks_r(struct host *host)
                }
                host->z.hostFlags |= VENUSDOWN; /* Failed */
                ClearHostCallbacks_r(host, 1 /* locked */ );
-               nfids = 0;
                break;
            }
            if (nfids < AFSCBMAX)
index b879ebc9ed13bf33f90e8adab5e4c195d3f325a6..b8bc0a84a72d4f4d6307d3021aa3733b3eccaa8e 100644 (file)
@@ -5512,7 +5512,6 @@ UV_ListVolumes(afs_uint32 aserver, afs_int32 apart, int all,
     afs_int32 code = 0;
     volEntries volumeInfo;
 
-    code = 0;
     *size = 0;
     *resultPtr = (volintInfo *) 0;
     volumeInfo.volEntries_val = (volintInfo *) 0;      /*this hints the stub to allocate space */