summaryrefslogtreecommitdiff
path: root/int_array.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-08-15 11:37:33 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-08-15 11:37:33 -0400
commited6a8b0cbdfd4b2231b89bfa420147a88f7312cf (patch)
tree977391e709e054552fba2757f0403631589b4abe /int_array.c
parent0703039505200ca5126e11d905a6fa40c602d1b9 (diff)
downloadgawk-ed6a8b0cbdfd4b2231b89bfa420147a88f7312cf.tar.gz
Fix int_array.c:is_integer to remove check superseded by improved logic merged from stable branch.
Diffstat (limited to 'int_array.c')
-rw-r--r--int_array.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/int_array.c b/int_array.c
index 38b4943e..c244169f 100644
--- a/int_array.c
+++ b/int_array.c
@@ -125,28 +125,6 @@ is_integer(NODE *symbol, NODE *subs)
if (subs == Nnull_string || do_mpfr)
return NULL;
- /*
- * Protect against MAYBE_NUM values where the string may not regenerate
- * correctly. There could be white space and/or a non-decimal value.
- * If stfmt is not STFMT_UNUSED, it means that the string value was
- * generated using CONVFMT or OFMT, so there is no info there.
- */
- if ((subs->flags & STRCUR) != 0 && subs->stfmt == STFMT_UNUSED) {
- char *cp = subs->stptr;
-
- if ( subs->stlen == 0
- || cp[0] == '0'
- || isspace((unsigned char) cp[0])
- || isspace((unsigned char) cp[subs->stlen - 1])
- || ( subs->stlen >= 2
- && (cp[0] == '-' || cp[0] == '+')
- && cp[1] == '0'))
- return NULL;
- }
-
- if ((subs->flags & NUMINT) != 0)
- return & success_node;
-
#ifdef CHECK_INTEGER_USING_FORCE_NUMBER
/*
* This approach is much simpler, because we remove all of the strtol