summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2011-08-02 21:03:04 +0000
committerJason Woodward2011-08-02 21:03:04 +0000
commit68fefd28c8f191cb784bab22f282c048f7a47444 (patch)
treeacec73df90d9b0b8185213ea1d0fbf417528fd03
parent598a8bcded03f85cfcc9af78e0b56718a9eb614d (diff)
downloadslapt-src-68fefd28c8f191cb784bab22f282c048f7a47444.tar.gz
silence warn unused system return value
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 98854ad..cb72805 100644
--- a/src/main.c
+++ b/src/main.c
@@ -450,8 +450,11 @@ static void clean (slapt_src_config *config)
int r = 0, command_len = strlen (file->d_name)+8;
char *command = slapt_malloc (sizeof *command * command_len);
r = snprintf (command, command_len, "rm -rf %s", file->d_name);
- if (r+1 == command_len)
- system (command);
+ if (r+1 == command_len) {
+ int sys_r = system (command);
+ if (sys_r != 0)
+ exit (EXIT_FAILURE);
+ }
}
}
}