Browse Source

tools: fix compile warning under Ubuntu

Rusty Russell 16 years ago
parent
commit
d7ec8f0d41
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tools/tools.c

+ 2 - 1
tools/tools.c

@@ -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;
 }