salvageserver: unable to write child log: out of memory 84/12284/2
authorMark Vitale <mvitale@sinenomine.net>
Fri, 13 May 2016 02:23:36 +0000 (22:23 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 13 May 2016 04:03:08 +0000 (00:03 -0400)
Changes to salvageserver logging in commit
24fed351fd13b38bfaf9f278c914a47782dbf670
introduced a new bug in SalvageLogCleanup; the test for calloc() failure
was inadvertently inverted.

Fix the sense of the test.

Change-Id: Id0ee4ac3e60d7285163a9ab0b32bd7d48e570ac0
Reviewed-on: https://gerrit.openafs.org/12284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/vol/salvaged.c

index f513ce3..753fc18 100644 (file)
@@ -774,7 +774,7 @@ SalvageLogCleanup(int pid)
     }
 
     buf = calloc(1, LOG_XFER_BUF_SIZE);
-    if (buf != NULL) {
+    if (buf == NULL) {
        Log("Unable to write child log: out of memory\n");
        goto done;
     }