summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2018-02-08 13:07:16 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2018-02-08 13:07:16 +0100
commite0abf14b09f5fcb20fa2301a9a0499d3d1c5d11a (patch)
treede0393324ee06e6aee14a8e2c0243cc6f4536483 /acinclude.m4
parent95d89505a623cd743e05ac8b0b30ddcb85091506 (diff)
downloadgmp-e0abf14b09f5fcb20fa2301a9a0499d3d1c5d11a.tar.gz
printf/snprntffuns.c: report -1 as an error.
acinclude.m4: Refuse -1 as a normal return value.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index aa91aa11f..2ea5f5aa2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3729,11 +3729,11 @@ check (const char *fmt, ...)
ret = vsnprintf (buf, 4, fmt, ap);
- if (strcmp (buf, "hel") != 0)
+ if (ret == -1 || strcmp (buf, "hel") != 0)
return 1;
/* allowed return values */
- if (ret != -1 && ret != 3 && ret != 11)
+ if (ret != 3 && ret != 11)
return 2;
return 0;