]> git.ozlabs.org Git - ccan/commitdiff
tools: fix compile warning under Ubuntu
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 29 Sep 2009 03:24:29 +0000 (12:54 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 29 Sep 2009 03:24:29 +0000 (12:54 +0930)
tools/tools.c

index 4fbc6857c2b7e72fb1300e5102cc89289dda9f7c..87ff4a3b65f4fe9899cf8aebb6e99a40cd244221 100644 (file)
@@ -79,7 +79,8 @@ static int unlink_all(char *dir)
 {
        char cmd[strlen(dir) + sizeof("rm -rf ")];
        sprintf(cmd, "rm -rf %s", dir);
-       system(cmd);
+       if (system(cmd) != 0)
+               warn("Could not remove temporary work in %s", dir);
        return 0;
 }