]> git.refcnt.org Git - colorize.git/commitdiff
Bail out if both clean switches are provided
authorSteven Schubiger <stsc@refcnt.org>
Tue, 28 May 2013 15:56:18 +0000 (17:56 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Tue, 28 May 2013 15:56:18 +0000 (17:56 +0200)
colorize.c

index 652d3a6ecec82c197bf6381c12309fd62845248f..c402a0156759ab464e76345f357f6daa449b003e 100644 (file)
@@ -310,6 +310,8 @@ main (int argc, char **argv)
 
     if (clean || clean_all)
       {
+        if (clean && clean_all)
+          vfprintf_fail (formats[FMT_GENERIC], "--clean and --clean-all switch are mutually exclusive");
         if (arg_cnt > 1)
           {
             const char *format = "%s %s";