[hackers] [sbase] Do not mask previous return-values in libutil/rm.c || FRIGN
commit 18642bd3684b8fa6d8415b24392ba13c94c2ea36
Author: FRIGN <dev_AT_frign.de>
Date: Mon Mar 2 10:53:55 2015 +0100
Do not mask previous return-values in libutil/rm.c
Thanks Michael Forney <mforney_AT_mforney.org> for this observation!
diff --git a/libutil/rm.c b/libutil/rm.c
index aa6648b..965a25a 100644
--- a/libutil/rm.c
+++ b/libutil/rm.c
_AT_@ -17,6 +17,7 @@ rm(const char *path, int unused)
if (remove(path) < 0) {
if (!rm_fflag)
weprintf("remove %s:", path);
- rm_status = !(rm_fflag && errno == ENOENT);
+ if (!(rm_fflag && errno == ENOENT))
+ rm_status = 1;
}
}
Received on Tue Mar 03 2015 - 14:32:25 CET
This archive was generated by hypermail 2.3.0
: Tue Mar 03 2015 - 14:36:17 CET