Fix compiler warnings
This commit is contained in:
parent
79344ff371
commit
6cbf515e30
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat_util.c,v 1.3 1995/10/22 08:20:44 mycroft Exp $ */
|
||||
/* $NetBSD: compat_util.c,v 1.4 1996/03/14 19:31:45 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christos Zoulas
|
||||
@ -156,7 +156,6 @@ emul_find(p, sgp, prefix, path, pbuf, cflag)
|
||||
free(buf, M_TEMP);
|
||||
}
|
||||
|
||||
done:
|
||||
vrele(nd.ni_vp);
|
||||
if (!cflag)
|
||||
vrele(ndroot.ni_vp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_resource_43.c,v 1.3 1995/10/07 06:26:28 mycroft Exp $ */
|
||||
/* $NetBSD: kern_resource_43.c,v 1.4 1996/03/14 19:31:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
@ -93,8 +93,9 @@ compat_43_sys_setrlimit(p, v, retval)
|
||||
struct rlimit lim;
|
||||
int error;
|
||||
|
||||
if (error = copyin((caddr_t)SCARG(uap, rlp), (caddr_t)&olim,
|
||||
sizeof (struct orlimit)))
|
||||
error = copyin((caddr_t)SCARG(uap, rlp), (caddr_t)&olim,
|
||||
sizeof (struct orlimit));
|
||||
if (error)
|
||||
return (error);
|
||||
lim.rlim_cur = olim.rlim_cur;
|
||||
lim.rlim_max = olim.rlim_max;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_sig_43.c,v 1.6 1996/01/04 22:23:01 jtc Exp $ */
|
||||
/* $NetBSD: kern_sig_43.c,v 1.7 1996/03/14 19:31:47 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
@ -126,8 +126,9 @@ compat_43_sys_sigstack(p, v, retval)
|
||||
return (error);
|
||||
if (SCARG(uap, nss) == 0)
|
||||
return (0);
|
||||
if (error = copyin((caddr_t)SCARG(uap, nss), (caddr_t)&ss,
|
||||
sizeof (ss)))
|
||||
error = copyin((caddr_t)SCARG(uap, nss), (caddr_t)&ss,
|
||||
sizeof (ss));
|
||||
if (error)
|
||||
return (error);
|
||||
psp->ps_flags |= SAS_ALTSTACK;
|
||||
psp->ps_sigstk.ss_sp = ss.ss_sp;
|
||||
@ -176,13 +177,15 @@ compat_43_sys_sigvec(p, v, retval)
|
||||
if (p->p_flag & P_NOCLDSTOP)
|
||||
sv->sv_flags |= SA_NOCLDSTOP;
|
||||
sv->sv_mask &= ~bit;
|
||||
if (error = copyout((caddr_t)sv, (caddr_t)SCARG(uap, osv),
|
||||
sizeof (vec)))
|
||||
error = copyout((caddr_t)sv, (caddr_t)SCARG(uap, osv),
|
||||
sizeof (vec));
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
if (SCARG(uap, nsv)) {
|
||||
if (error = copyin((caddr_t)SCARG(uap, nsv), (caddr_t)sv,
|
||||
sizeof (vec)))
|
||||
error = copyin((caddr_t)SCARG(uap, nsv), (caddr_t)sv,
|
||||
sizeof (vec));
|
||||
if (error)
|
||||
return (error);
|
||||
sv->sv_flags ^= SA_RESTART; /* opposite of SV_INTERRUPT */
|
||||
setsigvec(p, signum, (struct sigaction *)sv);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty_43.c,v 1.2 1996/02/10 00:12:44 christos Exp $ */
|
||||
/* $NetBSD: tty_43.c,v 1.3 1996/03/14 19:31:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
@ -84,7 +84,12 @@ static int compatspcodes[] = {
|
||||
#define CLR(t, f) (t) &= ~(f)
|
||||
#define ISSET(t, f) ((t) & (f))
|
||||
|
||||
int ttcompatgetflags __P((struct tty *));
|
||||
void ttcompatsetflags __P((struct tty *, struct termios *));
|
||||
void ttcompatsetlflags __P((struct tty *, struct termios *));
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ttcompat(tp, com, data, flag, p)
|
||||
register struct tty *tp;
|
||||
u_long com;
|
||||
@ -314,6 +319,7 @@ ttcompatgetflags(tp)
|
||||
return (flags);
|
||||
}
|
||||
|
||||
void
|
||||
ttcompatsetflags(tp, t)
|
||||
register struct tty *tp;
|
||||
register struct termios *t;
|
||||
@ -401,6 +407,7 @@ ttcompatsetflags(tp, t)
|
||||
t->c_cflag = cflag;
|
||||
}
|
||||
|
||||
void
|
||||
ttcompatsetlflags(tp, t)
|
||||
register struct tty *tp;
|
||||
register struct termios *t;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uipc_syscalls_43.c,v 1.4 1996/02/10 00:12:46 christos Exp $ */
|
||||
/* $NetBSD: uipc_syscalls_43.c,v 1.5 1996/03/14 19:31:50 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1990, 1993
|
||||
@ -214,8 +214,9 @@ compat_43_sys_recvmsg(p, v, retval)
|
||||
struct iovec aiov[UIO_SMALLIOV], *iov;
|
||||
int error;
|
||||
|
||||
if (error = copyin((caddr_t)SCARG(uap, msg), (caddr_t)&msg,
|
||||
sizeof (struct omsghdr)))
|
||||
error = copyin((caddr_t)SCARG(uap, msg), (caddr_t)&msg,
|
||||
sizeof (struct omsghdr));
|
||||
if (error)
|
||||
return (error);
|
||||
if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) {
|
||||
if ((u_int)msg.msg_iovlen >= UIO_MAXIOV)
|
||||
@ -226,8 +227,9 @@ compat_43_sys_recvmsg(p, v, retval)
|
||||
} else
|
||||
iov = aiov;
|
||||
msg.msg_flags = SCARG(uap, flags) | MSG_COMPAT;
|
||||
if (error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov,
|
||||
(unsigned)(msg.msg_iovlen * sizeof (struct iovec))))
|
||||
error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov,
|
||||
(unsigned)(msg.msg_iovlen * sizeof (struct iovec)));
|
||||
if (error)
|
||||
goto done;
|
||||
msg.msg_iov = iov;
|
||||
error = recvit(p, SCARG(uap, s), &msg,
|
||||
@ -285,8 +287,9 @@ compat_43_sys_sendmsg(p, v, retval)
|
||||
struct iovec aiov[UIO_SMALLIOV], *iov;
|
||||
int error;
|
||||
|
||||
if (error = copyin(SCARG(uap, msg), (caddr_t)&msg,
|
||||
sizeof (struct omsghdr)))
|
||||
error = copyin(SCARG(uap, msg), (caddr_t)&msg,
|
||||
sizeof (struct omsghdr));
|
||||
if (error)
|
||||
return (error);
|
||||
if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) {
|
||||
if ((u_int)msg.msg_iovlen >= UIO_MAXIOV)
|
||||
@ -296,8 +299,9 @@ compat_43_sys_sendmsg(p, v, retval)
|
||||
M_WAITOK);
|
||||
} else
|
||||
iov = aiov;
|
||||
if (error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov,
|
||||
(unsigned)(msg.msg_iovlen * sizeof (struct iovec))))
|
||||
error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov,
|
||||
(unsigned)(msg.msg_iovlen * sizeof (struct iovec)));
|
||||
if (error)
|
||||
goto done;
|
||||
msg.msg_flags = MSG_COMPAT;
|
||||
msg.msg_iov = iov;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_syscalls_43.c,v 1.3 1995/10/07 06:26:31 mycroft Exp $ */
|
||||
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -62,10 +62,12 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
static void cvtstat __P((struct stat *, struct ostat *));
|
||||
|
||||
/*
|
||||
* Convert from an old to a new stat structure.
|
||||
*/
|
||||
static int
|
||||
static void
|
||||
cvtstat(st, ost)
|
||||
struct stat *st;
|
||||
struct ostat *ost;
|
||||
@ -112,7 +114,7 @@ compat_43_sys_stat(p, v, retval)
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
|
||||
SCARG(uap, path), p);
|
||||
if (error = namei(&nd))
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
error = vn_stat(nd.ni_vp, &sb, p);
|
||||
vput(nd.ni_vp);
|
||||
@ -146,7 +148,7 @@ compat_43_sys_lstat(p, v, retval)
|
||||
|
||||
NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKPARENT, UIO_USERSPACE,
|
||||
SCARG(uap, path), p);
|
||||
if (error = namei(&nd))
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
/*
|
||||
* For symbolic links, always return the attributes of its
|
||||
@ -190,6 +192,7 @@ compat_43_sys_lstat(p, v, retval)
|
||||
* Return status information about a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
compat_43_sys_fstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
@ -375,7 +378,7 @@ compat_43_sys_getdirentries(p, v, retval)
|
||||
int error, eofflag, readcnt;
|
||||
long loff;
|
||||
|
||||
if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
|
||||
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
|
||||
return (error);
|
||||
if ((fp->f_flag & FREAD) == 0)
|
||||
return (EBADF);
|
||||
@ -450,7 +453,7 @@ unionread:
|
||||
|
||||
#ifdef UNION
|
||||
{
|
||||
extern int (**union_vnodeop_p)();
|
||||
extern int (**union_vnodeop_p) __P((void *));
|
||||
extern struct vnode *union_dircache __P((struct vnode *));
|
||||
|
||||
if ((SCARG(uap, count) == auio.uio_resid) &&
|
||||
|
Loading…
Reference in New Issue
Block a user