More NULL vs not pointer.

This commit is contained in:
petrov 2003-10-21 09:02:50 +00:00
parent 0833278c93
commit fd995d7327
5 changed files with 22 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_ipc.c,v 1.6 2003/01/19 16:47:14 thorpej Exp $ */
/* $NetBSD: svr4_32_ipc.c,v 1.7 2003/10/21 09:02:50 petrov Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_ipc.c,v 1.6 2003/01/19 16:47:14 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_ipc.c,v 1.7 2003/10/21 09:02:50 petrov Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -662,7 +662,7 @@ svr4_32_shmctl(l, v, retval)
SCARG(&ap, shmid) = SCARG(uap, shmid);
if (SCARG(uap, buf) != NULL) {
if (SCARG(uap, buf)) {
SCARG(&ap, buf) = stackgap_alloc(p, &sg, sizeof (struct shmid_ds));
switch (SCARG(uap, cmd)) {
case SVR4_IPC_SET:
@ -683,7 +683,7 @@ svr4_32_shmctl(l, v, retval)
}
}
else
SCARG(&ap, buf) = NULL;
SCARG(&ap, buf) = 0;
switch (SCARG(uap, cmd)) {
@ -691,7 +691,7 @@ svr4_32_shmctl(l, v, retval)
SCARG(&ap, cmd) = IPC_STAT;
if ((error = sys___shmctl13(l, &ap, retval)) != 0)
return error;
if (SCARG(uap, buf) == NULL)
if (!SCARG(uap, buf))
return 0;
error = copyin(&bs, SCARG(&ap, buf), sizeof bs);
if (error)

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_misc.c,v 1.23 2003/06/29 22:29:51 fvdl Exp $ */
/* $NetBSD: svr4_32_misc.c,v 1.24 2003/10/21 09:02:50 petrov Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.23 2003/06/29 22:29:51 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.24 2003/10/21 09:02:50 petrov Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -135,7 +135,7 @@ svr4_32_sys_wait(l, v, retval)
SCARG(&w4, rusage) = NULL;
SCARG(&w4, options) = 0;
if (SCARG(uap, status) == NULL) {
if (SCARG(uap, status) == 0) {
caddr_t sg = stackgap_init(p, 0);
SCARG(&w4, status) = stackgap_alloc(p, &sg, sz);
@ -194,7 +194,7 @@ svr4_32_sys_execv(l, v, retval)
SCARG(&ap, path) = SCARG(uap, path);
SCARG(&ap, argp) = SCARG(uap, argp);
SCARG(&ap, envp) = NULL;
SCARG(&ap, envp) = 0;
return netbsd32_execve(l, &ap, retval);
}
@ -1077,7 +1077,7 @@ svr4_32_hrtcntl(p, uap, retval)
DPRINTF(("clk == %d\n", SCARG(uap, clk)));
return EINVAL;
}
if (SCARG(uap, ti) == NULL) {
if (SCARG(uap, ti) == 0) {
DPRINTF(("ti NULL\n"));
return EINVAL;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_signal.c,v 1.10 2003/09/28 10:22:21 martin Exp $ */
/* $NetBSD: svr4_32_signal.c,v 1.11 2003/10/21 09:02:50 petrov Exp $ */
/*-
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.10 2003/09/28 10:22:21 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.11 2003/10/21 09:02:50 petrov Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_svr4.h"
@ -709,7 +709,7 @@ svr4_32_sys_context(l, v, retval)
case SVR4_SETCONTEXT:
DPRINTF(("setcontext(%p)\n", SCARG(uap, uc)));
if (SCARG(uap, uc) == NULL)
if (!SCARG(uap, uc))
exit1(l, W_EXITCODE(0, 0));
else if ((error = copyin((caddr_t)(u_long)SCARG(uap, uc),
&uc, sizeof(uc))) != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_stat.c,v 1.11 2003/06/29 22:29:51 fvdl Exp $ */
/* $NetBSD: svr4_32_stat.c,v 1.12 2003/10/21 09:02:50 petrov Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_stat.c,v 1.11 2003/06/29 22:29:51 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_stat.c,v 1.12 2003/10/21 09:02:50 petrov Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -772,7 +772,7 @@ svr4_32_sys_utime(l, v, retval)
ttp = stackgap_alloc(p, &sg, sizeof(tbuf));
SCARG(&ap, path) = (const char *)(u_long)SCARG(uap, path);
CHECK_ALT_EXIST(p, &sg, SCARG(&ap, path));
if (SCARG(uap, ubuf) != NULL) {
if (SCARG(uap, ubuf)) {
if ((error = copyin((caddr_t)(u_long)SCARG(uap, ubuf),
&ub, sizeof(ub))) != 0)
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_stream.c,v 1.12 2003/06/29 22:29:52 fvdl Exp $ */
/* $NetBSD: svr4_32_stream.c,v 1.13 2003/10/21 09:02:50 petrov Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_stream.c,v 1.12 2003/06/29 22:29:52 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_stream.c,v 1.13 2003/10/21 09:02:50 petrov Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -1512,7 +1512,7 @@ svr4_32_sys_putmsg(l, v, retval)
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return EBADF;
if (SCARG(uap, ctl) != NULL) {
if (SCARG(uap, ctl)) {
if ((error = copyin((caddr_t)(u_long)SCARG(uap, ctl),
&ctl, sizeof(ctl))) != 0)
return error;
@ -1520,7 +1520,7 @@ svr4_32_sys_putmsg(l, v, retval)
else
ctl.len = -1;
if (SCARG(uap, dat) != NULL) {
if (SCARG(uap, dat)) {
if ((error = copyin((caddr_t)(u_long)SCARG(uap, dat),
&dat, sizeof(dat))) != 0)
return error;
@ -1686,7 +1686,7 @@ svr4_32_sys_getmsg(l, v, retval)
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return EBADF;
if (SCARG(uap, ctl) != NULL) {
if (SCARG(uap, ctl)) {
if ((error = copyin((caddr_t)(u_long)SCARG(uap, ctl),
&ctl, sizeof(ctl))) != 0)
return error;
@ -1696,7 +1696,7 @@ svr4_32_sys_getmsg(l, v, retval)
ctl.maxlen = 0;
}
if (SCARG(uap, dat) != NULL) {
if (SCARG(uap, dat)) {
if ((error = copyin((caddr_t)(u_long)SCARG(uap, dat),
&dat, sizeof(dat))) != 0)
return error;