diff options
author | phk <phk@FreeBSD.org> | 1999-10-29 19:03:18 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-10-29 19:03:18 +0000 |
commit | a1f8f43fa00e2a83be8e5af4d233d1083f82477b (patch) | |
tree | 0356f5427b1ebc996fc9b2abb9205cedc3606199 /sys/pci/pci.c | |
parent | 8e3c3eafedf7a33a4058652691ad300f004263e7 (diff) | |
download | FreeBSD-src-a1f8f43fa00e2a83be8e5af4d233d1083f82477b.zip FreeBSD-src-a1f8f43fa00e2a83be8e5af4d233d1083f82477b.tar.gz |
Don't test boolean return against != 1.
Don't needlessly assign the error variable in an if statement.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r-- | sys/pci/pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c index a78903e..9a756a8 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -662,8 +662,8 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) /* * Check the user's buffer to make sure it's readable. */ - if ((error = useracc((caddr_t)cio->patterns, - cio->pat_buf_len, B_READ)) != 1){ + if (!useracc((caddr_t)cio->patterns, + cio->pat_buf_len, B_READ)) { printf("pci_ioctl: pattern buffer %p, " "length %u isn't user accessible for" " READ\n", cio->patterns, @@ -698,8 +698,8 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) /* * Make sure we can write to the match buffer. */ - if ((error = useracc((caddr_t)cio->matches, cio->match_buf_len, - B_WRITE)) != 1) { + if (!useracc((caddr_t)cio->matches, + cio->match_buf_len, B_WRITE)) { printf("pci_ioctl: match buffer %p, length %u " "isn't user accessible for WRITE\n", cio->matches, cio->match_buf_len); |