mirror of
https://github.com/troglobit/finit.git
synced 2026-10-15 10:29:35 +00:00
Check return value from remove(), found by Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
305ad302f2
commit
32ec25b070
1 file changed
+2
-1
+2
-1
@@ -379,7 +379,8 @@ int serv_delete(char *arg)
|
||||
|
||||
if (iforce || yorn("Remove file and symlink(s) to %s (y/N)? ", fn)) {
|
||||
do_disable(arg, 0);
|
||||
remove(fn);
|
||||
if (remove(fn))
|
||||
err(1, "Failed removing %s", fn);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user