From 048936d2b0358ba184b5380751744b8516fd74d1 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Wed, 10 Jun 2020 17:47:55 +0200 Subject: Merge multiple vfprintf_fail() calls for --clean[-all] --- colorize.c | 9 +-------- 1 file changed, 1 insertion(+), 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 { -- cgit v1.2.3