From f3c1ed23270f2db1e6c2456439dd12b7b68e8bde Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 2 Oct 1994 17:48:58 +0000 Subject: GCC cleanup. Reviewed by: Submitted by: Obtained from: --- sys/fs/fdescfs/fdesc_vnops.c | 3 ++- sys/fs/fifofs/fifo_vnops.c | 44 ++++++++++++++++++++++------------------- sys/fs/msdosfs/msdosfs_vfsops.c | 19 +++--------------- sys/fs/nullfs/null_subr.c | 18 ++++++++++------- 4 files changed, 40 insertions(+), 44 deletions(-) (limited to 'sys/fs') diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index b88f308..b73df0e 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.4 1994/09/09 13:24:26 davidg Exp $ + * $Id: fdesc_vnops.c,v 1.5 1994/09/21 03:46:56 wollman Exp $ */ /* @@ -58,6 +58,7 @@ #include #include #include +#include #include #define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL) diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index d27cbe1..bd250de 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94 - * $Id: fifo_vnops.c,v 1.4 1994/09/21 03:46:57 wollman Exp $ + * $Id: fifo_vnops.c,v 1.5 1994/09/22 19:38:07 wollman Exp $ */ #include @@ -153,20 +153,23 @@ fifo_open(ap) if ((fip = vp->v_fifoinfo) == NULL) { MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK); vp->v_fifoinfo = fip; - if (error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0)) { + error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0); + if (error) { free(fip, M_VNODE); vp->v_fifoinfo = NULL; return (error); } fip->fi_readsock = rso; - if (error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0)) { + error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0); + if (error) { (void)soclose(rso); free(fip, M_VNODE); vp->v_fifoinfo = NULL; return (error); } fip->fi_writesock = wso; - if (error = unp_connect2(wso, rso)) { + error = unp_connect2(wso, rso); + if (error) { (void)soclose(wso); (void)soclose(rso); free(fip, M_VNODE); @@ -247,8 +250,8 @@ fifo_read(ap) rso->so_state |= SS_NBIO; startresid = uio->uio_resid; VOP_UNLOCK(ap->a_vp); - error = soreceive(rso, (struct mbuf **)0, uio, (int *)0, - (struct mbuf **)0, (struct mbuf **)0); + error = soreceive(rso, (struct mbuf **)0, uio, + (struct mbuf **)0, (struct mbuf **)0, (int*)0); VOP_LOCK(ap->a_vp); /* * Clear EOF indication after first such return. @@ -418,33 +421,34 @@ fifo_close(ap) return (error2); } + /* - * Print out the contents of a fifo vnode. + * Print out internal contents of a fifo vnode. */ int -fifo_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +fifo_printinfo(vp) + struct vnode *vp; { + register struct fifoinfo *fip = vp->v_fifoinfo; - printf("tag VT_NON"); - fifo_printinfo(ap->a_vp); - printf("\n"); + printf(", fifo with %ld readers and %ld writers", + fip->fi_readers, fip->fi_writers); return (0); } /* - * Print out internal contents of a fifo vnode. + * Print out the contents of a fifo vnode. */ int -fifo_printinfo(vp) - struct vnode *vp; +fifo_print(ap) + struct vop_print_args /* { + struct vnode *a_vp; + } */ *ap; { - register struct fifoinfo *fip = vp->v_fifoinfo; - printf(", fifo with %d readers and %d writers", - fip->fi_readers, fip->fi_writers); + printf("tag VT_NON"); + fifo_printinfo(ap->a_vp); + printf("\n"); return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 1c36f8a..8f27076 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.3 1994/09/21 03:47:16 wollman Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.4 1994/09/27 20:42:54 phk Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.19 1994/08/21 18:44:10 ws Exp $ */ /*- @@ -230,7 +230,7 @@ msdosfs_mount(mp, path, data, ndp, p) pmp->pm_mask = args.mask; (void) msdosfs_statfs(mp, &mp->mnt_stat, p); #ifdef MSDOSFS_DEBUG - printf("msdosfs_mount(): mp %x, pmp %x, inusemap %x\n", mp, pmp, pmp->pm_inusemap); + printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); #endif return 0; } @@ -515,19 +515,6 @@ msdosfs_unmount(mp, mntflags, p) if (error) return error; pmp->pm_devvp->v_specflags &= ~SI_MOUNTEDON; -#ifdef MSDOSFS_DEBUG - printf("msdosfs_umount(): just before calling VOP_CLOSE()\n"); - printf("flag %08x, usecount %d, writecount %d, holdcnt %d\n", - vp->v_flag, vp->v_usecount, vp->v_writecount, vp->v_holdcnt); - printf("lastr %d, id %d, mount %08x, op %08x\n", - vp->v_lastr, vp->v_id, vp->v_mount, vp->v_op); - printf("freef %08x, freeb %08x, mountf %08x, mountb %08x\n", - vp->v_freef, vp->v_freeb, vp->v_mountf, vp->v_mountb); - printf("cleanblkhd %08x, dirtyblkhd %08x, numoutput %d, type %d\n", - vp->v_cleanblkhd, vp->v_dirtyblkhd, vp->v_numoutput, vp->v_type); - printf("union %08x, tag %d, data[0] %08x, data[1] %08x\n", - vp->v_socket, vp->v_tag, vp->v_data[0], vp->v_data[1]); -#endif error = VOP_CLOSE(pmp->pm_devvp, pmp->pm_ronly ? FREAD : FREAD | FWRITE, NOCRED, p); vrele(pmp->pm_devvp); @@ -549,7 +536,7 @@ msdosfs_root(mp, vpp) error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, NULL, &ndep); #ifdef MSDOSFS_DEBUG - printf("msdosfs_root(); mp %08x, pmp %08x, ndep %08x, vp %08x\n", + printf("msdosfs_root(); mp %p, pmp %p, ndep %p, vp %p\n", mp, pmp, ndep, DETOV(ndep)); #endif if (error == 0) diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 5541fb3..8d18ffd 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -35,7 +35,7 @@ * * @(#)null_subr.c 8.4 (Berkeley) 1/21/94 * - * $Id: lofs_subr.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp $ + * $Id: null_subr.c,v 1.2 1994/05/25 09:08:00 rgrimes Exp $ */ #include @@ -153,7 +153,8 @@ null_node_alloc(mp, lowervp, vpp) struct vnode *othervp, *vp; int error; - if (error = getnewvnode(VT_NULL, mp, null_vnodeop_p, vpp)) + error = getnewvnode(VT_NULL, mp, null_vnodeop_p, vpp); + if (error) return (error); vp = *vpp; @@ -167,7 +168,8 @@ null_node_alloc(mp, lowervp, vpp) * check to see if someone else has beaten us to it. * (We could have slept in MALLOC.) */ - if (othervp = null_node_find(lowervp)) { + othervp = null_node_find(lowervp); + if (othervp) { FREE(xp, M_TEMP); vp->v_type = VBAD; /* node is discarded */ vp->v_usecount = 0; /* XXX */ @@ -194,7 +196,8 @@ null_node_create(mp, lowervp, newvpp) { struct vnode *aliasvp; - if (aliasvp = null_node_find(mp, lowervp)) { + aliasvp = null_node_find(mp, lowervp); + if (aliasvp) { /* * null_node_find has taken another reference * to the alias vnode. @@ -216,7 +219,8 @@ null_node_create(mp, lowervp, newvpp) /* * Make new vnode reference the null_node. */ - if (error = null_node_alloc(mp, lowervp, &aliasvp)) + error = null_node_alloc(mp, lowervp, &aliasvp); + if (error) return error; /* @@ -229,8 +233,8 @@ null_node_create(mp, lowervp, newvpp) #ifdef DIAGNOSTIC if (lowervp->v_usecount < 1) { /* Should never happen... */ - vprint ("null_node_create: alias "); - vprint ("null_node_create: lower "); + vprint ("null_node_create: alias ",aliasvp); + vprint ("null_node_create: lower ",lowervp); printf ("null_node_create: lower has 0 usecount.\n"); panic ("null_node_create: lower has 0 usecount."); }; -- cgit v1.1