summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-09-09 00:11:50 +0000
committerrwatson <rwatson@FreeBSD.org>2004-09-09 00:11:50 +0000
commita43f8c237d71208d31dd8f3fb3e10e51da52b2a8 (patch)
tree3c01f94a314d8511d9b16a54b7350203f2187c3a
parentdb223378ac33191f9433f25ce7798ee62fc8a9af (diff)
downloadFreeBSD-src-a43f8c237d71208d31dd8f3fb3e10e51da52b2a8.zip
FreeBSD-src-a43f8c237d71208d31dd8f3fb3e10e51da52b2a8.tar.gz
Compare/set pointers using NULL not 0.
-rw-r--r--sys/net/bpf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index f48fcda..5877b73 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -332,7 +332,7 @@ bpfopen(dev, flags, fmt, td)
* Each minor can be opened by only one process. If the requested
* minor is in use, return EBUSY.
*/
- if (d) {
+ if (d != NULL) {
mtx_unlock(&bpf_mtx);
return (EBUSY);
}
@@ -387,7 +387,7 @@ bpfclose(dev, flags, fmt, td)
#endif /* MAC */
knlist_destroy(&d->bd_sel.si_note);
bpf_freed(d);
- dev->si_drv1 = 0;
+ dev->si_drv1 = NULL;
free(d, M_BPF);
return (0);
@@ -404,7 +404,7 @@ bpfclose(dev, flags, fmt, td)
(d)->bd_hlen = (d)->bd_slen; \
(d)->bd_sbuf = (d)->bd_fbuf; \
(d)->bd_slen = 0; \
- (d)->bd_fbuf = 0;
+ (d)->bd_fbuf = NULL;
/*
* bpfread - read next chunk of packets from buffers
*/
OpenPOWER on IntegriCloud