From 11e1107684c92a6c9e3646d7d7c329ae1556147b Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:16:10 +0000 Subject: [PATCH] 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 --- src/viced/afsfileprocs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index d1376f7..b27d7dd 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; -- 1.9.4