]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
expand: avoid an extraneous warning on 32 bit
authorPádraig Brady <P@draigBrady.com>
Wed, 1 Mar 2017 17:24:57 +0000 (09:24 -0800)
committerPádraig Brady <P@draigBrady.com>
Wed, 1 Mar 2017 17:25:28 +0000 (09:25 -0800)
* src/expand-common (parse-tab-stops): Exit earlier upon overflow
so another warning isn't issued (on 32 bit) in add_tab_stop().
Flagged in https://hydra.nixos.org/build/49499970

src/expand-common.c

index 9b6cdb9dc5ace8b53a71d24d9aa0a6adcc32b377..0728e70d0d9b59cfc3615d139428ad6a92b897c4 100644 (file)
@@ -126,7 +126,6 @@ parse_tab_stops (char const *stops)
                 {
                   if (! set_extend_size (tabval))
                     {
-                      extend_tabval = false;
                       ok = false;
                       break;
                     }
@@ -175,7 +174,7 @@ parse_tab_stops (char const *stops)
         }
     }
 
-  if (have_tabval)
+  if (ok && have_tabval)
     {
       if (extend_tabval)
         ok &= set_extend_size (tabval);
@@ -183,7 +182,7 @@ parse_tab_stops (char const *stops)
         add_tab_stop (tabval);
     }
 
-  if (!ok)
+  if (! ok)
     exit (EXIT_FAILURE);
 }