This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
PATCH : libiberty/strtoul/ && within ||
- To: gdb-patches@sourceware.cygnus.com (gdb-patches@sourceware.cygnus.com)
- Subject: PATCH : libiberty/strtoul/ && within ||
- From: "Philippe De Muyter" <phdm@macqel.be>
- Date: Thu, 12 Aug 1999 00:40:17 +0200 (CEST)
Symptom :
gcc -c -DHAVE_CONFIG_H -g -O2 -W -Wall -I. -I/share/src/gnu/gdb-19990809/libiberty/../include /share/src/gnu/gdb-19990809/libiberty/strtoul.c
/share/src/gnu/gdb-19990809/libiberty/strtoul.c: In function `strtoul':
/share/src/gnu/gdb-19990809/libiberty/strtoul.c:94: warning: suggest parentheses around && within ||
Possible fix :
Thu Aug 12 00:11:02 1999 Philippe De Muyter <phdm@macqel.be>
* strtoul (strtoul): Add parentheses around && within ||.
--- ./libiberty/strtoul.c Wed Aug 11 18:42:46 1999
+++ ./libiberty/strtoul.c Wed Aug 11 11:21:36 1999
@@ -91,7 +91,7 @@ strtoul(nptr, endptr, base)
break;
if (c >= base)
break;
- if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;