Fix some int vs. NULL comparisons.

This commit is contained in:
fvdl 2003-10-21 01:38:42 +00:00
parent 6d8eafdb48
commit 38bee36b4c
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_socket.c,v 1.11 2003/06/29 22:29:39 fvdl Exp $ */
/* $NetBSD: netbsd32_socket.c,v 1.12 2003/10/21 01:38:42 fvdl Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.11 2003/06/29 22:29:39 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.12 2003/10/21 01:38:42 fvdl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ktrace.h"
@ -308,7 +308,7 @@ netbsd32_recvfrom(l, v, retval)
} else
msg.msg_namelen = 0;
msg.msg_name = SCARG(uap, from);
msg.msg_iov = NULL; /* ignored in recvit32(), uses iov */
msg.msg_iov = 0; /* ignored in recvit32(), uses iov */
msg.msg_iovlen = 1;
aiov.iov_base = (caddr_t)NETBSD32PTR64(SCARG(uap, buf));
aiov.iov_len = (u_long)SCARG(uap, len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_sysctl.c,v 1.10 2003/06/29 22:29:40 fvdl Exp $ */
/* $NetBSD: netbsd32_sysctl.c,v 1.11 2003/10/21 01:38:42 fvdl Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.10 2003/06/29 22:29:40 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.11 2003/10/21 01:38:42 fvdl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@ -186,7 +186,7 @@ netbsd32___sysctl(l, v, retval)
* arguments converted.
*/
if (SCARG(uap, new) != NULL &&
if (SCARG(uap, new) != 0 &&
(error = suser(p->p_ucred, &p->p_acflag)))
return (error);
/*
@ -269,7 +269,7 @@ netbsd32___sysctl(l, v, retval)
(error = copyin((caddr_t)NETBSD32PTR64(SCARG(uap, oldlenp)),
&savelen, sizeof(savelen))))
return (error);
if (SCARG(uap, old) != NULL) {
if (SCARG(uap, old) != 0) {
error = lockmgr(&sysctl_memlock, LK_EXCLUSIVE, NULL);
if (error)
return (error);
@ -284,7 +284,7 @@ netbsd32___sysctl(l, v, retval)
error = (*fn)(name + 1, SCARG(uap, namelen) - 1,
(void *)NETBSD32PTR64(SCARG(uap, old)), &oldlen,
(void *)NETBSD32PTR64(SCARG(uap, new)), SCARG(uap, newlen), p);
if (SCARG(uap, old) != NULL) {
if (SCARG(uap, old) != 0) {
uvm_vsunlock(p, (void *)NETBSD32PTR64(SCARG(uap, old)),
savelen);
(void) lockmgr(&sysctl_memlock, LK_RELEASE, NULL);