From f39482db56b09f98e95fb86f97efa52d09a1b4a5 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 2 Aug 2019 19:38:47 -0400 Subject: -f with no operands returns 0 --- rm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rm.c b/rm.c index 2a7b750..8657203 100644 --- a/rm.c +++ b/rm.c @@ -130,8 +130,9 @@ int main(int argc, char **argv) } } - if (optind >= argc) - return 1; + if (optind >= argc) { + return force ? 0 : 1; + } int ret = 0; while (optind < argc) { -- cgit v1.2.1