diff options
author | Jim Meyering <jim@meyering.net> | 2005-03-25 20:59:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-03-25 20:59:26 +0000 |
commit | 3bf2d948e7e6db70652fbb059d3b136d1f737717 (patch) | |
tree | f279d9d99234b0e44b47c6384d7b2f13e685f7e5 | |
parent | 0d22e40cafec04305405d4668667a0ac0c2d5425 (diff) | |
download | coreutils-3bf2d948e7e6db70652fbb059d3b136d1f737717.tar.xz |
(parse_tab_stops, main): Update use of DECIMAL_DIGIT_ACCUMULATE.
-rw-r--r-- | src/expand.c | 4 | ||||
-rw-r--r-- | src/unexpand.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/expand.c b/src/expand.c index 4f57c6071..4dcc985b0 100644 --- a/src/expand.c +++ b/src/expand.c @@ -172,7 +172,7 @@ parse_tab_stops (char const *stops) } { /* Detect overflow. */ - if (DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', UINTMAX_MAX)) + if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', UINTMAX_MAX)) { size_t len = strspn (num_start, "0123456789"); char *bad_num = xstrndup (num_start, len); @@ -419,7 +419,7 @@ main (int argc, char **argv) have_tabval = true; } { - if (DECIMAL_DIGIT_ACCUMULATE (tabval, c - '0', UINTMAX_MAX)) + if (!DECIMAL_DIGIT_ACCUMULATE (tabval, c - '0', UINTMAX_MAX)) error (EXIT_FAILURE, 0, _("tab stop value is too large")); } obsolete_tablist = true; diff --git a/src/unexpand.c b/src/unexpand.c index 935f98600..5e8fe9c0d 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -193,7 +193,7 @@ parse_tab_stops (char const *stops) } { /* Detect overflow. */ - if (DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', UINTMAX_MAX)) + if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', UINTMAX_MAX)) { size_t len = strspn (num_start, "0123456789"); char *bad_num = xstrndup (num_start, len); @@ -517,7 +517,7 @@ main (int argc, char **argv) have_tabval = true; } { - if (DECIMAL_DIGIT_ACCUMULATE (tabval, c - '0', UINTMAX_MAX)) + if (!DECIMAL_DIGIT_ACCUMULATE (tabval, c - '0', UINTMAX_MAX)) error (EXIT_FAILURE, 0, _("tab stop value is too large")); } obsolete_tablist = true; |