This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH : libiberty/strtoul/ && within ||


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]