aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2020-06-10 17:47:55 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2020-06-10 17:47:55 +0200
commit048936d2b0358ba184b5380751744b8516fd74d1 (patch)
tree23adb826e64a1eda34df5c8effb54e3f026abdcb
parentde43ee678c8b820dc190b312c4fa62cdb98bbcc8 (diff)
downloadcolorize-048936d2b0358ba184b5380751744b8516fd74d1.tar.gz
colorize-048936d2b0358ba184b5380751744b8516fd74d1.tar.bz2
Merge multiple vfprintf_fail() calls for --clean[-all]
-rw-r--r--colorize.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/colorize.c b/colorize.c
index 147f13e..8a1cb52 100644
--- a/colorize.c
+++ b/colorize.c
@@ -412,14 +412,7 @@ main (int argc, char **argv)
if (clean && clean_all)
vfprintf_fail (formats[FMT_GENERIC], "--clean and --clean-all switch are mutually exclusive");
if (arg_cnt > 1)
- {
- const char *const format = "%s %s";
- const char *const message = "switch cannot be used with more than one file";
- if (clean)
- vfprintf_fail (format, "--clean", message);
- else if (clean_all)
- vfprintf_fail (format, "--clean-all", message);
- }
+ vfprintf_fail ("--clean%s switch cannot be used with more than one file", clean_all ? "-all" : "");
{
unsigned int i;
const struct option_set {