From: Simon Wilkinson Date: Tue, 19 Feb 2013 17:19:53 +0000 (+0000) Subject: up: Notice errors on both file handles X-Git-Tag: upstream/1.8.0_pre1^2~1459 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b6439fd4b0b381a2b2e33af5f0c76db1e72971bb;p=packages%2Fo%2Fopenafs.git up: Notice errors on both file handles Report errors on both filehandles in up's Copy routine, rather than just on the second one that we close. Caught by clang-analyzer Change-Id: Ia3aa9be91ccfca2993a4f27c291332e0b0d350f5 Reviewed-on: http://gerrit.openafs.org/9192 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/venus/up.c b/src/venus/up.c index 522dc08b4..f253875a9 100644 --- a/src/venus/up.c +++ b/src/venus/up.c @@ -296,6 +296,10 @@ Copy(char *file1, char *file2, short recursive, int level) /* Close the files */ code = close(f1); + if (code < 0) { + perror("close "); + rcode = 1; + } code = close(f2); if (code < 0) { perror("close ");