1
0
mirror of git://git.suckless.org/sbase synced 2024-12-25 16:32:37 +00:00

Do not mask previous return-values in libutil/rm.c

Thanks Michael Forney <mforney@mforney.org> for this observation!
This commit is contained in:
FRIGN 2015-03-02 10:53:55 +01:00
parent d806f75cb6
commit 5d6e609455

View File

@ -17,6 +17,7 @@ rm(const char *path, int unused)
if (remove(path) < 0) { if (remove(path) < 0) {
if (!rm_fflag) if (!rm_fflag)
weprintf("remove %s:", path); weprintf("remove %s:", path);
rm_status = !(rm_fflag && errno == ENOENT); if (!(rm_fflag && errno == ENOENT))
rm_status = 1;
} }
} }