chiark / gitweb /
delta: warn if diff failed
authorTom Gundersen <teg@jklm.no>
Thu, 25 Sep 2014 16:16:04 +0000 (18:16 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 25 Sep 2014 16:16:04 +0000 (18:16 +0200)
Found by Coverity. Fixes CID #1237541.

src/delta/delta.c

index 91f8592..2fdbeea 100644 (file)
@@ -159,7 +159,7 @@ static int notify_override_unchanged(const char *f) {
 
 static int found_override(const char *top, const char *bottom) {
         _cleanup_free_ char *dest = NULL;
-        int k;
+        int k, r;
         pid_t pid;
 
         assert(top);
@@ -194,7 +194,9 @@ static int found_override(const char *top, const char *bottom) {
                 _exit(1);
         }
 
-        wait_for_terminate(pid, NULL);
+        r = wait_for_terminate(pid, NULL);
+        if (r < 0)
+                log_warning("Failed to wait for diff: %s", strerror(-r));
 
         putchar('\n');