From e18a8f62065ffa7b2ca49d7b4baabd7d7ba92555 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 11 Sep 2010 10:46:50 -0400 Subject: [PATCH] Always check return code from iod_Write The return code from iod_Write is checked at every call site in the file, except this one. Check it, and return VOLSERDUMPERROR if appropriate. Spotted by a set but unused warning from gcc 4.6 Change-Id: I84f38a4b3b1e37c25be9c76702b0d2818058454e Reviewed-on: http://gerrit.openafs.org/2733 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e0708617b8f5df625b6ad62920665e704f1374f7) Reviewed-on: http://gerrit.openafs.org/2795 --- src/volser/dumpstuff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index 0b06feb43..1ec359c0f 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -664,6 +664,8 @@ DumpStandardTag(struct iod *iodp, char tag, afs_uint32 section) return VOLSERDUMPERROR; } code = iod_Write(iodp, &tag, 1); + if (code != 1) + return VOLSERDUMPERROR; return 0; } -- 2.39.5