summaryrefslogtreecommitdiff
path: root/src/unexpand.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-10-24 07:28:39 +0000
committerJim Meyering <jim@meyering.net>2005-10-24 07:28:39 +0000
commit57d5938b174238e4c70619ee64652c93679810ed (patch)
treea560ea9a41197c422db8688c38e8c8924a8d3633 /src/unexpand.c
parent48e6b742788d317fb78bb0730a2d18c779c72a5b (diff)
downloadcoreutils-57d5938b174238e4c70619ee64652c93679810ed.tar.xz
* src/expand.c (parse_tab_stops): Add comment to make this function
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.
Diffstat (limited to 'src/unexpand.c')
-rw-r--r--src/unexpand.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/unexpand.c b/src/unexpand.c
index 5537ef828..0f4e6710c 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -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
{