Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Fix some int vs. NULL comparisons.
details: https://anonhg.NetBSD.org/src/rev/1a0ffbdcf505
branches: trunk
changeset: 553740:1a0ffbdcf505
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Oct 21 01:38:42 2003 +0000
description:
Fix some int vs. NULL comparisons.
diffstat:
sys/compat/netbsd32/netbsd32_socket.c | 6 +++---
sys/compat/netbsd32/netbsd32_sysctl.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 1a6e266bf4af -r 1a0ffbdcf505 sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c Tue Oct 21 01:38:27 2003 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c Tue Oct 21 01:38:42 2003 +0000
@@ -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 @@
} 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);
diff -r 1a6e266bf4af -r 1a0ffbdcf505 sys/compat/netbsd32/netbsd32_sysctl.c
--- a/sys/compat/netbsd32/netbsd32_sysctl.c Tue Oct 21 01:38:27 2003 +0000
+++ b/sys/compat/netbsd32/netbsd32_sysctl.c Tue Oct 21 01:38:42 2003 +0000
@@ -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 @@
* 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 @@
(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 @@
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);
Home |
Main Index |
Thread Index |
Old Index