]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Prever other types to int in warning.c
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:26:53 +0000 (23:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
* src/warning.c (set_warning_option): Prefer bool for boolean.

src/warning.c

index 3423b29333266625fc37e6b37612f2fe441a8ec9..0209e9da20fad2c7f107343355aaf7f632ab469a 100644 (file)
@@ -90,7 +90,7 @@ int warning_option = WARN_ALL & ~(WARN_VERBOSE_WARNINGS|WARN_MISSING_ZERO_BLOCKS
 void
 set_warning_option (const char *arg)
 {
-  int negate = 0;
+  bool negate = false;
   int option;
 
   if (strcmp (arg, "none") == 0)
@@ -100,7 +100,7 @@ set_warning_option (const char *arg)
     }
   if (strlen (arg) > 2 && memcmp (arg, "no-", 3) == 0)
     {
-      negate = 1;
+      negate = true;
       arg += 3;
     }