[current tinderbox] failure on i386/pc98

Stefan Farfeleder stefan at fafoe.narf.at
Fri Mar 5 05:41:54 PST 2004


On Fri, Mar 05, 2004 at 08:16:28AM -0500, FreeBSD Tinderbox wrote:

> ===> usr.sbin/boot98cfg
> cc -O -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /other/tinderbox/CURRENT/i386/pc98/src/usr.sbin/boot98cfg/boot98cfg.c
> /other/tinderbox/CURRENT/i386/pc98/src/usr.sbin/boot98cfg/boot98cfg.c: In function `main':
> /other/tinderbox/CURRENT/i386/pc98/src/usr.sbin/boot98cfg/boot98cfg.c:200: warning: comparison between pointer and integer
> /other/tinderbox/CURRENT/i386/pc98/src/usr.sbin/boot98cfg/boot98cfg.c:217: warning: comparison between pointer and integer

Suggested fix:

--- src/usr.sbin/boot98cfg/boot98cfg.c.orig	Fri Mar  5 14:25:11 2004
+++ src/usr.sbin/boot98cfg/boot98cfg.c	Fri Mar  5 14:27:14 2004
@@ -197,7 +197,7 @@
 			break;
 		case 's':
 			secsize = strtol(optarg, &endptr, 0);
-			if (errno || *optarg == NULL || *endptr)
+			if (errno || *optarg == '\0' || *endptr)
 				errx(1, "%s: Bad argument to -s option",
 				    optarg);
 			switch (secsize) {
@@ -214,7 +214,7 @@
 		case 'v':
 			v_flag = 1;
 			version = strtol(optarg, &endptr, 0);
-			if (errno || *optarg == NULL || *endptr ||
+			if (errno || *optarg == '\0' || *endptr ||
 			    version < 0 || version > 255)
 				errx(1, "%s: Bad argument to -s option",
 				    optarg);

Stefan


More information about the freebsd-current mailing list