]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/expand.c (parse_tab_stops): Add comment to make this function
authorJim Meyering <jim@meyering.net>
Mon, 24 Oct 2005 07:28:39 +0000 (07:28 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 24 Oct 2005 07:28:39 +0000 (07:28 +0000)
identical to the one in unexpand.c.

* src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
identical to the one in expand.c.

src/expand.c
src/unexpand.c

index bf857b0e4544dacb2d437c4079e96f2d228f0ade..b1b10042280f2c4dc65ec706bae1c24b631fdfae 100644 (file)
@@ -172,6 +172,7 @@ parse_tab_stops (char const *stops)
              num_start = stops;
            }
 
+         /* Detect overflow.  */
          if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', uintmax_t))
            {
              size_t len = strspn (num_start, "0123456789");
index 5537ef8280010b2ac96bbc5452c4590f3fb063ab..0f4e6710c44994cee8a87339521a6b1810a1d014 100644 (file)
@@ -190,18 +190,17 @@ parse_tab_stops (char const *stops)
              have_tabval = true;
              num_start = stops;
            }
-         {
-           /* Detect overflow.  */
-           if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', uintmax_t))
-             {
-               size_t len = strspn (num_start, "0123456789");
-               char *bad_num = xstrndup (num_start, len);
-               error (0, 0, _("tab stop is too large %s"), quote (bad_num));
-               free (bad_num);
-               ok = false;
-               stops = num_start + len - 1;
-             }
-         }
+
+         /* Detect overflow.  */
+         if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', uintmax_t))
+           {
+             size_t len = strspn (num_start, "0123456789");
+             char *bad_num = xstrndup (num_start, len);
+             error (0, 0, _("tab stop is too large %s"), quote (bad_num));
+             free (bad_num);
+             ok = false;
+             stops = num_start + len - 1;
+           }
        }
       else
        {