From: Simon Wilkinson Date: Thu, 14 Feb 2013 20:08:07 +0000 (+0000) Subject: Unix CM: Don't check if var is 0, then zero it X-Git-Tag: upstream/1.8.0_pre1^2~1523 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5529d5712f650845c4712b9a61aed377099ae857;p=packages%2Fo%2Fopenafs.git Unix CM: Don't check if var is 0, then zero it There's a couple of places in afs_daemons.c where we do: if (code != 0) return; code = 0; The final line is obviously redundant, and makes clang sulk at us. So, remove it. Caught by clang-analyzer Change-Id: Ic55edf1b05f3f45eb1f0cecdb3c2318e6f7bd0ec Reviewed-on: http://gerrit.openafs.org/9154 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index d301b464b..687bf6aec 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -573,7 +573,6 @@ BStore(struct brequest *ab) AFS_STATCNT(BStore); if ((code = afs_InitReq(&treq, ab->cred))) return; - code = 0; tvc = ab->vc; #if defined(AFS_SGI_ENV) /* @@ -620,7 +619,6 @@ BPartialStore(struct brequest *ab) AFS_STATCNT(BStore); if ((code = afs_InitReq(&treq, ab->cred))) return; - code = 0; tvc = ab->vc; locked = tvc->lock.excl_locked? 1:0; if (!locked)