Error building if_fatm.c
harti brandt
brandt at fokus.gmd.de
Thu Dec 25 10:53:08 PST 2003
Craig Rodrigues wrote:
>Hi,
>
>I just cvsup'd current and got the following error when
>building if_fatm.c:
>
>cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstric
>t-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fforma
>t-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contri
>b/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/dev/ath -I/u
>sr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm -D_KERNEL -inclu
>de opt_global.h -fno-common -finline-limit=15000 -fno-strict-aliasing -mno-alig
>n-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys
>/dev/fatm/if_fatm.c
>/usr/src/sys/dev/fatm/if_fatm.c: In function `fatm_open_vcc':
>/usr/src/sys/dev/fatm/if_fatm.c:2285: warning: comparison between pointer and integer
>*** Error code 1
>
>
>I think that this is due to the new definition of NULL
>in <sys/_null.h>.
>
>Here is the offending code:
>
> 2227 int error;
>
> 2285 if (error != NULL) {
> 2286 sc->vccs[op->param.vci] = NULL;
> 2287 sc->open_vccs--;
> 2288 goto done;
> 2289 }
>
>
>Is the correct fix this?
>
>
>--- sys/dev/fatm/if_fatm.c.orig Tue Dec 23 19:46:08 2003
>+++ sys/dev/fatm/if_fatm.c Tue Dec 23 19:46:18 2003
>@@ -2282,7 +2282,7 @@
> sc->open_vccs++;
>
> error = fatm_load_vc(sc, vc);
>- if (error != NULL) {
>+ if (error != 0) {
> sc->vccs[op->param.vci] = NULL;
> sc->open_vccs--;
> goto done;
>
>
>
>
Looks ok.
harti
More information about the freebsd-current
mailing list