diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-29 19:03:18 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-29 19:03:18 +0000 |
| commit | 7254edcfafdac8a8fcaca4e23c6d87011337700e (patch) | |
| tree | 0356f5427b1ebc996fc9b2abb9205cedc3606199 | |
| parent | 923502ff91327138aa9ef1d59ea7044d2936e0ef (diff) | |
Notes
| -rw-r--r-- | sys/dev/pci/pci.c | 8 | ||||
| -rw-r--r-- | sys/pci/pci.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index a78903e903a8..9a756a873a50 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/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); diff --git a/sys/pci/pci.c b/sys/pci/pci.c index a78903e903a8..9a756a873a50 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); |
