From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:16:10 +0000 (+0000) Subject: viced: Don't store rc from IH_DEC on error path X-Git-Tag: upstream/1.8.0_pre1^2~1442 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=11e1107684c92a6c9e3646d7d7c329ae1556147b;p=packages%2Fo%2Fopenafs.git viced: Don't store rc from IH_DEC on error path If CopyOnWrite has already failed, and is taking the volume offline for salvage we can't (and don't) do anything with further errors from IH_DEC. Instead of assigning these to 'rc', just ignore them. Caught by clang-analyzer Change-Id: I7bcd82f124740e3ca3d11cb2b079aa7ea5751cf9 Reviewed-on: http://gerrit.openafs.org/9239 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index d1376f72c..b27d7ddbf 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -1394,7 +1394,7 @@ CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len) FDH_REALLYCLOSE(newFdP); IH_RELEASE(newH); FDH_REALLYCLOSE(targFdP); - rc = IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr)); + IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr)); free(buff); VTakeOffline(volptr); return EIO;