diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-27 21:50:00 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-27 21:50:00 +0000 |
commit | a40e0249d4e2495009cf3fb552bc428d0a8a8676 (patch) | |
tree | 4c208238f4839fac2a65719e0587b7b1583d6224 /sys/dev/snp | |
parent | 143a811b84ef1bcf36b91153bfd028dca51265ef (diff) | |
download | FreeBSD-src-a40e0249d4e2495009cf3fb552bc428d0a8a8676.zip FreeBSD-src-a40e0249d4e2495009cf3fb552bc428d0a8a8676.tar.gz |
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Diffstat (limited to 'sys/dev/snp')
-rw-r--r-- | sys/dev/snp/snp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index ba71a94..686aa27 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -172,7 +172,7 @@ snpread(dev, uio, flag) if (((nblen / 2) >= SNOOP_MINLEN) && (nblen / 2) >= snp->snp_len) { while (((nblen / 2) >= snp->snp_len) && ((nblen / 2) >= SNOOP_MINLEN)) nblen = nblen / 2; - if (nbuf = malloc(nblen, M_TTYS, M_NOWAIT)) { + if ((nbuf = malloc(nblen, M_TTYS, M_NOWAIT)) != NULL) { bcopy(snp->snp_buf + snp->snp_base, nbuf, snp->snp_len); free(snp->snp_buf, M_TTYS); snp->snp_buf = nbuf; @@ -291,7 +291,7 @@ snpopen(dev, flag, mode, p) struct snoop *snp; register int unit, error; - if (error = suser(p->p_ucred, &p->p_acflag)) + if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return (error); if ((unit = minor(dev)) >= NSNP) |