[hackers] [sbase] A plain rm -f is valid and should not be considered an error || sin

From: <git_AT_suckless.org>
Date: Fri, 04 Jul 2014 15:55:49 +0200

commit 8eea7f74e9d35714e3d0a13d527e258758d1a5f3
Author: sin <sin_AT_2f30.org>
Date: Fri Jul 4 14:50:20 2014 +0100

    A plain rm -f is valid and should not be considered an error

diff --git a/rm.c b/rm.c
index ac6b5e5..eda84c2 100644
--- a/rm.c
+++ b/rm.c
_AT_@ -28,8 +28,12 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND;
 
- if (argc < 1)
- usage();
+ if (argc < 1) {
+ if (rm_fflag == false)
+ usage();
+ else
+ return EXIT_SUCCESS;
+ }
 
         for(; argc > 0; argc--, argv++)
                 rm(argv[0]);
Received on Fri Jul 04 2014 - 15:55:49 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 04 2014 - 16:00:10 CEST