diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 881be49c8168..758f3b5abbe6 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.16 1998/09/07 13:17:00 bde Exp $ + * $Id: fdesc_vfsops.c,v 1.17 1999/01/12 11:49:30 eivind Exp $ */ /* @@ -138,7 +138,7 @@ fdesc_unmount(mp, mntflags, p) */ if (rootvp->v_usecount > 1) return (EBUSY); - if (error = vflush(mp, rootvp, flags)) + if ((error = vflush(mp, rootvp, flags)) != 0) return (error); /* diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index fb8f4a169f25..6bdea5fc4ce8 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.39 1998/12/07 21:58:31 archie Exp $ + * $Id: fdesc_vnops.c,v 1.40 1998/12/14 05:00:57 dillon Exp $ */ /* @@ -283,7 +283,7 @@ fdesc_lookup(ap) case Fdevfd: if (cnp->cn_namelen == 2 && bcmp(pname, "..", 2) == 0) { - if (error = fdesc_root(dvp->v_mount, vpp)) + if ((error = fdesc_root(dvp->v_mount, vpp)) != 0) goto bad; return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index b3a63b55d613..bca552c80742 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.38 1998/10/31 15:31:24 peter Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.39 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -911,9 +911,9 @@ msdosfs_sync(mp, waitfor, cred, p) nvp = vp->v_mntvnodes.le_next; dep = VTODE(vp); if (vp->v_type == VNON || - (dep->de_flag & + ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && - (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY)) { + (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) { simple_unlock(&vp->v_interlock); continue; } diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index aad4e6ba9f1e..36aa91d73af7 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.79 1998/11/29 22:38:57 dt Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.80 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -278,6 +278,8 @@ msdosfs_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } @@ -485,11 +487,14 @@ msdosfs_setattr(ap) switch (vp->v_type) { case VDIR: return (EISDIR); + /* NOT REACHED */ case VLNK: case VREG: if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } error = detrunc(dep, vap->va_size, 0, cred, ap->a_p); if (error) diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index b2e1b63af955..514ba82c6d04 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -37,11 +37,11 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ */ /* @@ -484,6 +484,8 @@ null_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } return (null_bypass((struct vop_generic_args *)ap)); diff --git a/sys/fs/procfs/procfs_subr.c b/sys/fs/procfs/procfs_subr.c index 813232cb5fb3..98e36879a4b6 100644 --- a/sys/fs/procfs/procfs_subr.c +++ b/sys/fs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id: procfs_subr.c,v 1.21 1997/12/12 03:33:43 sef Exp $ + * $Id: procfs_subr.c,v 1.22 1999/01/05 03:53:06 peter Exp $ */ #include @@ -119,7 +119,7 @@ procfs_allocvp(mp, vpp, pid, pfs_type) */ MALLOC(pfs, struct pfsnode *, sizeof(struct pfsnode), M_TEMP, M_WAITOK); - if (error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) { + if ((error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) != 0) { FREE(pfs, M_TEMP); goto out; } @@ -327,7 +327,7 @@ vfs_getuserstr(uio, buf, buflenp) return (EMSGSIZE); xlen = uio->uio_resid; - if (error = uiomove(buf, xlen, uio)) + if ((error = uiomove(buf, xlen, uio)) != 0) return (error); /* allow multiple writes without seeks */ diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index daab08f2c240..1aa545331884 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.62 1998/12/04 22:54:51 archie Exp $ + * $Id: procfs_vnops.c,v 1.63 1999/01/05 03:53:06 peter Exp $ */ /* @@ -137,8 +137,8 @@ procfs_open(ap) switch (pfs->pfs_type) { case Pmem: - if ((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL) || - (pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)) + if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) || + ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE))) return (EBUSY); p1 = ap->a_p; @@ -285,7 +285,7 @@ procfs_ioctl(ap) case PIOCCONT: /* Restart a proc */ if (procp->p_step == 0) return EINVAL; /* Can only start a stopped process */ - if (signo = *(int*)ap->a_data) { + if ((signo = *(int*)ap->a_data) != 0) { if (signo >= NSIG || signo <= 0) return EINVAL; psignal(procp, signo); @@ -847,7 +847,7 @@ procfs_readdir(ap) bcopy(pt->pt_name, dp->d_name, pt->pt_namlen + 1); dp->d_type = pt->pt_type; - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } @@ -906,7 +906,7 @@ procfs_readdir(ap) break; } - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } done: diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 6096a1b90a3f..88290e436617 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.78 1998/12/16 00:10:51 eivind Exp $ + * $Id: spec_vnops.c,v 1.79 1999/01/21 08:29:07 dillon Exp $ */ #include @@ -210,7 +210,7 @@ spec_open(ap) error = (*cdevsw[maj]->d_open)(dev, ap->a_mode, S_IFCHR, p); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); return (error); - + /* NOT REACHED */ case VBLK: if ((u_int)maj >= nblkdev) return (ENXIO); @@ -233,6 +233,9 @@ spec_open(ap) if (error) return (error); return ((*bdevsw[maj]->d_open)(dev, ap->a_mode, S_IFBLK, p)); + /* NOT REACHED */ + default: + break; } return (0); } diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index fb700cca5d7b..db4d4d3b14e8 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.29 1998/05/06 05:29:37 msmith Exp $ + * $Id: union_vfsops.c,v 1.30 1998/09/07 13:17:02 bde Exp $ */ /* @@ -325,7 +325,7 @@ union_unmount(mp, mntflags, p) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - if (error = union_root(mp, &um_rootvp)) + if ((error = union_root(mp, &um_rootvp)) != 0) return (error); /* diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 87fda6d6cc81..ba9b2a3315bb 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.58 1998/07/04 20:45:35 julian Exp $ + * $Id: union_vnops.c,v 1.59 1998/12/14 05:00:59 dillon Exp $ */ #include @@ -695,8 +695,12 @@ union_access(ap) */ if (ap->a_mode & VWRITE && (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)) { switch (ap->a_vp->v_type) { - case VREG: case VDIR: case VLNK: + case VREG: + case VDIR: + case VLNK: return (EROFS); + default: + break; } } if ((vp = un->un_uppervp) != NULLVP) { diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c index 7839645da0ac..b299051d2ec9 100644 --- a/sys/miscfs/devfs/devfs_tree.c +++ b/sys/miscfs/devfs/devfs_tree.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: devfs_tree.c,v 1.57 1998/11/26 18:50:23 eivind Exp $ + * $Id: devfs_tree.c,v 1.58 1998/12/10 19:57:00 eivind Exp $ */ @@ -229,8 +229,8 @@ dev_finddir(char *orig_path, dn_p dirnode, int create, dn_p *dn_pp) \***************************************/ if(!create) return ENOENT; - if(retval = dev_add_entry(name, dirnode, DEV_DIR, - NULL, NULL, NULL, &devnmp)) { + if((retval = dev_add_entry(name, dirnode, DEV_DIR, + NULL, NULL, NULL, &devnmp)) != 0) { return retval; } dnp = devnmp->dnp; @@ -600,8 +600,8 @@ devfs_propogate(devnm_p parent,devnm_p child) * if the node already exists on that plane it won't be * re-made.. */ - if ( error = dev_add_entry(child->name, adnp, type, - NULL, dnp, adnp->dvm, &newnmp)) { + if ((error = dev_add_entry(child->name, adnp, type, + NULL, dnp, adnp->dvm, &newnmp)) != 0) { printf("duplicating %s failed\n",child->name); } } @@ -670,7 +670,7 @@ dev_dup_plane(struct devfsmount *devfs_mp_p) DBPRINT((" dev_dup_plane\n")); if(devfs_up_and_going) { - if(error = dev_dup_entry(NULL, dev_root, &new, devfs_mp_p)) { + if((error = dev_dup_entry(NULL, dev_root, &new, devfs_mp_p)) != 0) { return error; } } else { /* we are doing the dummy mount during initialisation.. */ @@ -726,9 +726,9 @@ dev_dup_entry(dn_p parent, devnm_p back, devnm_p *dnm_pp, * go get the node made (if we need to) * use the back one as a prototype */ - if ( error = dev_add_entry(back->name, parent, type, + if ((error = dev_add_entry(back->name, parent, type, NULL, dnp, - parent?parent->dvm:dvm, &newnmp)) { + parent?parent->dvm:dvm, &newnmp)) != 0) { printf("duplicating %s failed\n",back->name); } @@ -750,8 +750,8 @@ dev_dup_entry(dn_p parent, devnm_p back, devnm_p *dnm_pp, for(newback = back->dnp->by.Dir.dirlist; newback; newback = newback->next) { - if(error = dev_dup_entry(newnmp->dnp, - newback, &newfront, NULL)) + if((error = dev_dup_entry(newnmp->dnp, + newback, &newfront, NULL)) != 0) { break; /* back out with an error */ } @@ -895,6 +895,8 @@ DBPRINT((" vntodn ")); printf("bad-type2 (VNON)"); return(EINVAL); #endif + default: + break; } *dn_pp = (dn_p)vn_p->v_data; @@ -980,9 +982,9 @@ DBPRINT(("(New vnode)")); break; case DEV_BDEV: vn_p->v_type = VBLK; - if (nvp = checkalias(vn_p, + if ((nvp = checkalias(vn_p, dnp->by.Bdev.dev, - (struct mount *)0)) + (struct mount *)0)) != NULL) { vput(vn_p); vn_p = nvp; @@ -990,9 +992,9 @@ DBPRINT(("(New vnode)")); break; case DEV_CDEV: vn_p->v_type = VCHR; - if (nvp = checkalias(vn_p, + if ((nvp = checkalias(vn_p, dnp->by.Cdev.dev, - (struct mount *)0)) + (struct mount *)0)) != NULL) { vput(vn_p); vn_p = nvp; @@ -1029,14 +1031,14 @@ dev_add_entry(char *name, dn_p parent, int type, union typeinfo *by, int error = 0; DBPRINT((" devfs_add_entry\n")); - if (error = dev_add_node(type, by, proto, &dnp, - (parent?parent->dvm:dvm))) + if ((error = dev_add_node(type, by, proto, &dnp, + (parent?parent->dvm:dvm))) != 0) { printf("Device %s: base node allocation failed (Errno=%d)\n", name,error); return error; } - if ( error = dev_add_name(name ,parent ,NULL, dnp, nm_pp)) + if ((error = dev_add_name(name ,parent ,NULL, dnp, nm_pp)) != 0) { devfs_dn_free(dnp); /* 1->0 for dir, 0->(-1) for other */ printf("Device %s: name slot allocation failed (Errno=%d)\n", diff --git a/sys/miscfs/devfs/devfs_vfsops.c b/sys/miscfs/devfs/devfs_vfsops.c index 95ae9579719b..f3611f18d5a8 100644 --- a/sys/miscfs/devfs/devfs_vfsops.c +++ b/sys/miscfs/devfs/devfs_vfsops.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: devfs_vfsops.c,v 1.34 1998/10/31 15:31:23 peter Exp $ + * $Id: devfs_vfsops.c,v 1.35 1998/12/07 21:58:30 archie Exp $ * */ @@ -129,7 +129,7 @@ DBPRINT(("mount ")); mp->mnt_stat.f_fsid.val[1] = mp->mnt_stat.f_type; mp->mnt_flag |= MNT_LOCAL; - if(error = dev_dup_plane(devfs_mp_p)) + if((error = dev_dup_plane(devfs_mp_p)) != 0) { mp->mnt_data = (qaddr_t)0; free((caddr_t)devfs_mp_p, M_DEVFSMNT); diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index 56fa842cf921..2f7c4ed72eb1 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: devfs_vnops.c,v 1.65 1999/01/12 11:49:29 eivind Exp $ + * $Id: devfs_vnops.c,v 1.66 1999/01/21 08:29:06 dillon Exp $ */ @@ -138,7 +138,7 @@ DBPRINT(("lookup\n")); { return (ENOTDIR); } - if (error = VOP_ACCESS(dir_vnode, VEXEC, cnp->cn_cred, p)) + if ((error = VOP_ACCESS(dir_vnode, VEXEC, cnp->cn_cred, p)) != 0) { return (error); } @@ -174,8 +174,8 @@ DBPRINT(("lookup\n")); * Access for write is interpreted as allowing * creation of files in the directory. */ - if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, p)) + if ((error = VOP_ACCESS(dir_vnode, VWRITE, + cnp->cn_cred, p)) != 0) { DBPRINT(("MKACCESS ")); return (error); @@ -215,8 +215,8 @@ DBPRINT(("MKACCESS ")); /* * Write access to directory required to delete files. */ - if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, p)) + if ((error = VOP_ACCESS(dir_vnode, VWRITE, + cnp->cn_cred, p)) != 0) return (error); /* * we are trying to delete '.'. What does this mean? XXX @@ -257,8 +257,8 @@ DBPRINT(("MKACCESS ")); /* * Are we allowed to change the holding directory? */ - if (error = VOP_ACCESS(dir_vnode, VWRITE, - cnp->cn_cred, p)) + if ((error = VOP_ACCESS(dir_vnode, VWRITE, + cnp->cn_cred, p)) != 0) return (error); /* * Careful about locking second node. @@ -338,7 +338,7 @@ devfs_access(struct vop_access_args *ap) int i; DBPRINT(("access\n")); - if (error = devfs_vntodn(vp,&file_node)) + if ((error = devfs_vntodn(vp,&file_node)) != 0) { printf("devfs_vntodn returned %d ",error); return error; @@ -400,7 +400,7 @@ devfs_getattr(struct vop_getattr_args *ap) int error; DBPRINT(("getattr\n")); - if (error = devfs_vntodn(vp,&file_node)) + if ((error = devfs_vntodn(vp,&file_node)) != 0) { printf("devfs_vntodn returned %d ",error); return error; @@ -479,7 +479,7 @@ devfs_setattr(struct vop_setattr_args *ap) if (vap->va_flags != VNOVAL) /* XXX needs to be implemented */ return (EOPNOTSUPP); - if (error = devfs_vntodn(vp,&file_node)) + if ((error = devfs_vntodn(vp,&file_node)) != 0) { printf("devfs_vntodn returned %d ",error); return error; @@ -604,7 +604,7 @@ devfs_xread(struct vop_read_args *ap) dn_p file_node; DBPRINT(("read\n")); - if (error = devfs_vntodn(ap->a_vp,&file_node)) + if ((error = devfs_vntodn(ap->a_vp,&file_node)) != 0) { printf("devfs_vntodn returned %d ",error); return error; @@ -678,12 +678,12 @@ DBPRINT(("remove\n")); * are the end of the path. Get pointers to all our * devfs structures. */ - if (error = devfs_vntodn(dvp, &tdp)) { + if ((error = devfs_vntodn(dvp, &tdp)) != 0) { abortit: VOP_ABORTOP(dvp, cnp); return (error); } - if (error = devfs_vntodn(vp, &tp)) goto abortit; + if ((error = devfs_vntodn(vp, &tp)) != 0) goto abortit; /* * Assuming we are atomic, dev_lookup left this for us */ @@ -780,8 +780,8 @@ DBPRINT(("link\n")); * are the end of the path. Get pointers to all our * devfs structures. */ - if ( error = devfs_vntodn(tdvp,&tdp)) goto abortit; - if ( error = devfs_vntodn(vp,&fp)) goto abortit; + if ((error = devfs_vntodn(tdvp,&tdp)) != 0) goto abortit; + if ((error = devfs_vntodn(vp,&fp)) != 0) goto abortit; /* * trying to move it out of devfs? (v_tag == VT_DEVFS) @@ -880,12 +880,12 @@ devfs_rename(struct vop_rename_args *ap) * are the end of the path. Get pointers to all our * devfs structures. */ - if ( error = devfs_vntodn(tdvp,&tdp)) goto abortit; - if ( error = devfs_vntodn(fdvp,&fdp)) goto abortit; - if ( error = devfs_vntodn(fvp,&fp)) goto abortit; + if ((error = devfs_vntodn(tdvp,&tdp)) != 0) goto abortit; + if ((error = devfs_vntodn(fdvp,&fdp)) != 0) goto abortit; + if ((error = devfs_vntodn(fvp,&fp)) != 0) goto abortit; fnp = fp->last_lookup; if (tvp) { - if ( error = devfs_vntodn(tvp,&tp)) goto abortit; + if ((error = devfs_vntodn(tvp,&tp)) != 0) goto abortit; tnp = tp->last_lookup; } else { tp = NULL; @@ -1075,7 +1075,7 @@ devfs_symlink(struct vop_symlink_args *ap) devnm_p nm_p; DBPRINT(("symlink\n")); - if(error = devfs_vntodn(ap->a_dvp, &dnp)) { + if((error = devfs_vntodn(ap->a_dvp, &dnp)) != 0) { return (error); } @@ -1083,7 +1083,7 @@ DBPRINT(("symlink\n")); by.Slnk.namelen = strlen(ap->a_target); dev_add_entry(ap->a_cnp->cn_nameptr, dnp, DEV_SLNK, &by, NULL, NULL, &nm_p); - if(error = devfs_dntovn(nm_p->dnp, &vp)) { + if((error = devfs_dntovn(nm_p->dnp, &vp)) != 0) { return (error); } VOP_SETATTR(vp, ap->a_vap, ap->a_cnp->cn_cred, ap->a_cnp->cn_proc); @@ -1120,7 +1120,7 @@ devfs_readdir(struct vop_readdir_args *ap) DBPRINT(("readdir\n")); /* set up refs to dir */ - if (error = devfs_vntodn(vp,&dir_node)) + if ((error = devfs_vntodn(vp,&dir_node)) != 0) return error; if(dir_node->type != DEV_DIR) return(ENOTDIR); @@ -1183,8 +1183,8 @@ DBPRINT(("readdir\n")); if (uio->uio_resid < reclen) /* will it fit? */ break; strcpy( dirent.d_name,name); - if (error = uiomove ((caddr_t)&dirent, - dirent.d_reclen, uio)) + if ((error = uiomove ((caddr_t)&dirent, + dirent.d_reclen, uio)) != 0) break; } pos += reclen; @@ -1216,11 +1216,11 @@ devfs_readlink(struct vop_readlink_args *ap) DBPRINT(("readlink\n")); /* set up refs to dir */ - if (error = devfs_vntodn(vp,&lnk_node)) + if ((error = devfs_vntodn(vp,&lnk_node)) != 0) return error; if(lnk_node->type != DEV_SLNK) return(EINVAL); - if (error = VOP_ACCESS(vp, VREAD, ap->a_cred, NULL)) { /* XXX */ + if ((error = VOP_ACCESS(vp, VREAD, ap->a_cred, NULL)) != 0) { /* XXX */ return error; } error = uiomove(lnk_node->by.Slnk.name, lnk_node->by.Slnk.namelen, uio); @@ -1253,7 +1253,7 @@ devfs_reclaim(struct vop_reclaim_args *ap) int error; DBPRINT(("reclaim\n")); - if (error = devfs_vntodn(ap->a_vp,&file_node)) + if ((error = devfs_vntodn(ap->a_vp,&file_node)) != 0) { printf("devfs_vntodn returned %d ",error); return error; @@ -1328,7 +1328,7 @@ devfs_open( struct vop_open_args *ap) int error; dn_p dnp; - if (error = devfs_vntodn(vp,&dnp)) + if ((error = devfs_vntodn(vp,&dnp)) != 0) return error; switch (vp->v_type) { @@ -1341,13 +1341,16 @@ devfs_open( struct vop_open_args *ap) p); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); return (error); - + /* NOT REACHED */ case VBLK: error = (*dnp->by.Bdev.bdevsw->d_open)( dnp->by.Bdev.dev, ap->a_mode, S_IFBLK, p); + break; + default: + break; } return (error); } @@ -1379,7 +1382,7 @@ devfs_read( struct vop_read_args *ap) dev_t dev; dn_p dnp; - if (error = devfs_vntodn(vp,&dnp)) + if ((error = devfs_vntodn(vp,&dnp)) != 0) return error; @@ -1476,7 +1479,7 @@ devfs_write( struct vop_write_args *ap) int error = 0; dn_p dnp; - if (error = devfs_vntodn(vp,&dnp)) + if ((error = devfs_vntodn(vp,&dnp)) != 0) return error; @@ -1556,7 +1559,7 @@ devfs_ioctl(struct vop_ioctl_args *ap) dn_p dnp; int error; - if (error = devfs_vntodn(ap->a_vp,&dnp)) + if ((error = devfs_vntodn(ap->a_vp,&dnp)) != 0) return error; @@ -1595,7 +1598,7 @@ devfs_poll(struct vop_poll_args *ap) dn_p dnp; int error; - if (error = devfs_vntodn(ap->a_vp,&dnp)) + if ((error = devfs_vntodn(ap->a_vp,&dnp)) != 0) return error; @@ -1630,7 +1633,7 @@ devfs_fsync(struct vop_fsync_args *ap) dn_p dnp; int error; - if (error = devfs_vntodn(vp,&dnp)) + if ((error = devfs_vntodn(vp,&dnp)) != 0) return error; @@ -1707,7 +1710,7 @@ devfs_strategy(struct vop_strategy_args *ap) if ((ap->a_vp->v_type != VCHR) && (ap->a_vp->v_type != VBLK)) panic ("devfs_strat:badvnode type"); - if (error = devfs_vntodn(ap->a_vp,&dnp)) + if ((error = devfs_vntodn(ap->a_vp,&dnp)) != 0) return error; @@ -1766,7 +1769,7 @@ devfs_close(struct vop_close_args *ap) int error; dn_p dnp; - if (error = devfs_vntodn(vp,&dnp)) + if ((error = devfs_vntodn(vp,&dnp)) != 0) return error; @@ -1799,8 +1802,7 @@ devfs_close(struct vop_close_args *ap) ap->a_fflag, S_IFCHR, ap->a_p)); - break; - + /* NOT REACHED */ case VBLK: /* * On last close of a block device (that isn't mounted) @@ -1829,7 +1831,7 @@ devfs_close(struct vop_close_args *ap) ap->a_fflag, S_IFBLK, ap->a_p)); - + /* NOT REACHED */ default: panic("devfs_close: not special"); } diff --git a/sys/miscfs/fdesc/fdesc_vfsops.c b/sys/miscfs/fdesc/fdesc_vfsops.c index 881be49c8168..758f3b5abbe6 100644 --- a/sys/miscfs/fdesc/fdesc_vfsops.c +++ b/sys/miscfs/fdesc/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.16 1998/09/07 13:17:00 bde Exp $ + * $Id: fdesc_vfsops.c,v 1.17 1999/01/12 11:49:30 eivind Exp $ */ /* @@ -138,7 +138,7 @@ fdesc_unmount(mp, mntflags, p) */ if (rootvp->v_usecount > 1) return (EBUSY); - if (error = vflush(mp, rootvp, flags)) + if ((error = vflush(mp, rootvp, flags)) != 0) return (error); /* diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index fb8f4a169f25..6bdea5fc4ce8 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.39 1998/12/07 21:58:31 archie Exp $ + * $Id: fdesc_vnops.c,v 1.40 1998/12/14 05:00:57 dillon Exp $ */ /* @@ -283,7 +283,7 @@ fdesc_lookup(ap) case Fdevfd: if (cnp->cn_namelen == 2 && bcmp(pname, "..", 2) == 0) { - if (error = fdesc_root(dvp->v_mount, vpp)) + if ((error = fdesc_root(dvp->v_mount, vpp)) != 0) goto bad; return (0); } diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index 81261a900920..f8ca7596fe15 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95 - * $Id: kernfs_vnops.c,v 1.36 1998/12/04 22:54:51 archie Exp $ + * $Id: kernfs_vnops.c,v 1.37 1998/12/07 21:58:31 archie Exp $ */ /* @@ -293,8 +293,8 @@ kernfs_lookup(ap) #ifdef KERNFS_DIAGNOSTIC printf("kernfs_lookup: allocate new vnode\n"); #endif - if (error = getnewvnode(VT_KERNFS, dvp->v_mount, kernfs_vnodeop_p, - &fvp)) { + if ((error = getnewvnode(VT_KERNFS, dvp->v_mount, kernfs_vnodeop_p, + &fvp)) != 0) { vn_lock(dvp, LK_SHARED | LK_RETRY, p); return (error); } @@ -466,7 +466,7 @@ kernfs_read(ap) #endif len = 0; - if (error = kernfs_xread(kt, strbuf, sizeof(strbuf), &len)) + if ((error = kernfs_xread(kt, strbuf, sizeof(strbuf), &len)) != 0) return (error); if (len <= off) return (0); @@ -497,7 +497,7 @@ kernfs_write(ap) return (EINVAL); xlen = min(uio->uio_resid, KSTRING-1); - if (error = uiomove(strbuf, xlen, uio)) + if ((error = uiomove(strbuf, xlen, uio)) != 0) return (error); if (uio->uio_resid != 0) @@ -566,7 +566,7 @@ kernfs_readdir(ap) /* * And ship to userland */ - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index b2e1b63af955..514ba82c6d04 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -37,11 +37,11 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ */ /* @@ -484,6 +484,8 @@ null_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } return (null_bypass((struct vop_generic_args *)ap)); diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index 813232cb5fb3..98e36879a4b6 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id: procfs_subr.c,v 1.21 1997/12/12 03:33:43 sef Exp $ + * $Id: procfs_subr.c,v 1.22 1999/01/05 03:53:06 peter Exp $ */ #include @@ -119,7 +119,7 @@ procfs_allocvp(mp, vpp, pid, pfs_type) */ MALLOC(pfs, struct pfsnode *, sizeof(struct pfsnode), M_TEMP, M_WAITOK); - if (error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) { + if ((error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) != 0) { FREE(pfs, M_TEMP); goto out; } @@ -327,7 +327,7 @@ vfs_getuserstr(uio, buf, buflenp) return (EMSGSIZE); xlen = uio->uio_resid; - if (error = uiomove(buf, xlen, uio)) + if ((error = uiomove(buf, xlen, uio)) != 0) return (error); /* allow multiple writes without seeks */ diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index daab08f2c240..1aa545331884 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.62 1998/12/04 22:54:51 archie Exp $ + * $Id: procfs_vnops.c,v 1.63 1999/01/05 03:53:06 peter Exp $ */ /* @@ -137,8 +137,8 @@ procfs_open(ap) switch (pfs->pfs_type) { case Pmem: - if ((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL) || - (pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)) + if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) || + ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE))) return (EBUSY); p1 = ap->a_p; @@ -285,7 +285,7 @@ procfs_ioctl(ap) case PIOCCONT: /* Restart a proc */ if (procp->p_step == 0) return EINVAL; /* Can only start a stopped process */ - if (signo = *(int*)ap->a_data) { + if ((signo = *(int*)ap->a_data) != 0) { if (signo >= NSIG || signo <= 0) return EINVAL; psignal(procp, signo); @@ -847,7 +847,7 @@ procfs_readdir(ap) bcopy(pt->pt_name, dp->d_name, pt->pt_namlen + 1); dp->d_type = pt->pt_type; - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } @@ -906,7 +906,7 @@ procfs_readdir(ap) break; } - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } done: diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 6096a1b90a3f..88290e436617 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.78 1998/12/16 00:10:51 eivind Exp $ + * $Id: spec_vnops.c,v 1.79 1999/01/21 08:29:07 dillon Exp $ */ #include @@ -210,7 +210,7 @@ spec_open(ap) error = (*cdevsw[maj]->d_open)(dev, ap->a_mode, S_IFCHR, p); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); return (error); - + /* NOT REACHED */ case VBLK: if ((u_int)maj >= nblkdev) return (ENXIO); @@ -233,6 +233,9 @@ spec_open(ap) if (error) return (error); return ((*bdevsw[maj]->d_open)(dev, ap->a_mode, S_IFBLK, p)); + /* NOT REACHED */ + default: + break; } return (0); } diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c index fb700cca5d7b..db4d4d3b14e8 100644 --- a/sys/miscfs/union/union_vfsops.c +++ b/sys/miscfs/union/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.29 1998/05/06 05:29:37 msmith Exp $ + * $Id: union_vfsops.c,v 1.30 1998/09/07 13:17:02 bde Exp $ */ /* @@ -325,7 +325,7 @@ union_unmount(mp, mntflags, p) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - if (error = union_root(mp, &um_rootvp)) + if ((error = union_root(mp, &um_rootvp)) != 0) return (error); /* diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index 87fda6d6cc81..ba9b2a3315bb 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.58 1998/07/04 20:45:35 julian Exp $ + * $Id: union_vnops.c,v 1.59 1998/12/14 05:00:59 dillon Exp $ */ #include @@ -695,8 +695,12 @@ union_access(ap) */ if (ap->a_mode & VWRITE && (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)) { switch (ap->a_vp->v_type) { - case VREG: case VDIR: case VLNK: + case VREG: + case VDIR: + case VLNK: return (EROFS); + default: + break; } } if ((vp = un->un_uppervp) != NULLVP) { diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index b3a63b55d613..bca552c80742 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.38 1998/10/31 15:31:24 peter Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.39 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -911,9 +911,9 @@ msdosfs_sync(mp, waitfor, cred, p) nvp = vp->v_mntvnodes.le_next; dep = VTODE(vp); if (vp->v_type == VNON || - (dep->de_flag & + ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && - (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY)) { + (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) { simple_unlock(&vp->v_interlock); continue; } diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index aad4e6ba9f1e..36aa91d73af7 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.79 1998/11/29 22:38:57 dt Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.80 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -278,6 +278,8 @@ msdosfs_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } @@ -485,11 +487,14 @@ msdosfs_setattr(ap) switch (vp->v_type) { case VDIR: return (EISDIR); + /* NOT REACHED */ case VLNK: case VREG: if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } error = detrunc(dep, vap->va_size, 0, cred, ap->a_p); if (error) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 001d797fed4a..a49ac6d8ad24 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.45 1998/11/11 10:04:09 truckman Exp $ + * $Id: bpf.c,v 1.46 1998/12/07 21:58:36 archie Exp $ */ #include "bpfilter.h" @@ -985,7 +985,7 @@ bpf_ifname(ifp, ifr) char *s = ifp->if_name; char *d = ifr->ifr_name; - while (*d++ = *s++) + while ((*d++ = *s++) != 0) continue; d--; /* back to the null */ /* XXX Assume that unit number is less than 10. */ diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 67b7af1eabf9..11d3a5aa456d 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp - * $Id: if_fddisubr.c,v 1.32 1998/06/14 20:58:14 julian Exp $ + * $Id: if_fddisubr.c,v 1.33 1998/06/21 14:53:23 bde Exp $ */ #include "opt_atalk.h" @@ -149,9 +149,9 @@ fddi_output(ifp, m0, dst, rt0) senderr(ENETDOWN); getmicrotime(&ifp->if_lastchange); #if !defined(__bsdi__) || _BSDI_VERSION >= 199401 - if (rt = rt0) { + if ((rt = rt0) != NULL) { if ((rt->rt_flags & RTF_UP) == 0) { - if (rt0 = rt = RTALLOC1(dst, 1)) + if ((rt0 = rt = RTALLOC1(dst, 1)) != NULL) rt->rt_refcnt--; else senderr(EHOSTUNREACH); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 151df6e0d374..e1c629670494 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.70 1998/07/15 02:32:23 bde Exp $ + * $Id: if_sl.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -603,7 +603,7 @@ slstart(tp) bcopy(mtod(m1, caddr_t), cp, mlen); cp += mlen; len += mlen; - } while (m1 = m1->m_next); + } while ((m1 = m1->m_next) != NULL); } #endif ip = mtod(m, struct ip *); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index ed98e6c0a539..c395ee3ae1ac 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -480,8 +480,8 @@ tunread(dev, uio, flag) return EWOULDBLOCK; } tp->tun_flags |= TUN_RWAIT; - if( error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1), - "tunread", 0)) { + if((error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1), + "tunread", 0)) != 0) { splx(s); return error; } diff --git a/sys/net/route.c b/sys/net/route.c index f011264c793c..6a17db6a1928 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)route.c 8.2 (Berkeley) 11/15/93 - * $Id: route.c,v 1.49 1998/02/09 06:09:59 eivind Exp $ + * $Id: route.c,v 1.50 1998/04/17 22:36:57 des Exp $ */ #include "opt_inet.h" @@ -566,7 +566,7 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt) * Add the gateway. Possibly re-malloc-ing the storage for it * also add the rt_gwroute if possible. */ - if (error = rt_setgate(rt, dst, gateway)) { + if ((error = rt_setgate(rt, dst, gateway)) != 0) { Free(rt); senderr(error); } diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 97707e3ffbf6..bf5da6e18d4d 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 - * $Id: rtsock.c,v 1.36 1997/10/28 15:58:37 bde Exp $ + * $Id: rtsock.c,v 1.37 1997/10/31 08:53:13 davidg Exp $ */ @@ -356,8 +356,8 @@ route_output(m, so) case RTM_LOCK: if ((rnh = rt_tables[dst->sa_family]) == 0) { senderr(EAFNOSUPPORT); - } else if (rt = (struct rtentry *) - rnh->rnh_lookup(dst, netmask, rnh)) + } else if ((rt = (struct rtentry *) + rnh->rnh_lookup(dst, netmask, rnh)) != NULL) rt->rt_refcnt++; else senderr(ESRCH); diff --git a/sys/net/zlib.c b/sys/net/zlib.c index f16092db1a4b..687e3801eb9f 100644 --- a/sys/net/zlib.c +++ b/sys/net/zlib.c @@ -10,7 +10,7 @@ * - added inflateIncomp and deflateOutputPending * - allow strm->next_out to be NULL, meaning discard the output * - * $Id: zlib.c,v 1.6 1998/03/21 20:56:15 peter Exp $ + * $Id: zlib.c,v 1.7 1998/06/20 16:28:04 peter Exp $ */ /* @@ -99,7 +99,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) + return (strm->msg = (const char*)ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ @@ -807,7 +807,7 @@ int deflateInit2_(strm, level, method, windowBits, memLevel, strategy, if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + strm->msg = (const char*)ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } diff --git a/sys/net/zlib.h b/sys/net/zlib.h index 13fe524f91a4..b9499cb72549 100644 --- a/sys/net/zlib.h +++ b/sys/net/zlib.h @@ -1,4 +1,4 @@ -/* $Id: zlib.h,v 1.3 1997/08/19 14:10:50 peter Exp $ */ +/* $Id: zlib.h,v 1.4 1998/03/21 20:56:16 peter Exp $ */ /* * This file is derived from zlib.h and zconf.h from the zlib-1.0.4 @@ -281,7 +281,7 @@ typedef struct z_stream_s { uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total nb of bytes output so far */ - char *msg; /* last error message, NULL if no error */ + const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index 27295dc46781..e6023d696944 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -404,7 +404,7 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m) if ( aat == 0 && tpa.s_net == ma.s_net && tpa.s_node == ma.s_node && op != AARPOP_PROBE ) { - if ( aat = aarptnew( &spa )) { + if ((aat = aarptnew( &spa )) != NULL) { bcopy(( caddr_t )ea->aarp_sha, ( caddr_t )aat->aat_enaddr, sizeof( ea->aarp_sha )); aat->aat_flags |= ATF_COM; diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index 2138995d3b48..7900fe5c91b7 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -342,9 +342,9 @@ at_scrub( ifp, aa ) if ( aa->aa_flags & AFA_ROUTE ) { if (ifp->if_flags & IFF_LOOPBACK) { - if (error = aa_delsingleroute(&aa->aa_ifa, + if ((error = aa_delsingleroute(&aa->aa_ifa, &aa->aa_addr.sat_addr, - &aa->aa_netmask.sat_addr)) { + &aa->aa_netmask.sat_addr)) != 0) { return( error ); } } else if (ifp->if_flags & IFF_POINTOPOINT) { diff --git a/sys/netatalk/ddp_pcb.c b/sys/netatalk/ddp_pcb.c index ce681ffc509a..625382119344 100644 --- a/sys/netatalk/ddp_pcb.c +++ b/sys/netatalk/ddp_pcb.c @@ -349,7 +349,7 @@ at_pcbconnect(struct ddpcb *ddp, struct sockaddr *addr, struct proc *p) net = sat->sat_addr.s_net; } aa = 0; - if ( ifp = ro->ro_rt->rt_ifp ) { + if ((ifp = ro->ro_rt->rt_ifp) != NULL) { for ( aa = at_ifaddr; aa; aa = aa->aa_next ) { if ( aa->aa_ifp == ifp && ntohs( net ) >= ntohs( aa->aa_firstnet ) && diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index ce681ffc509a..625382119344 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -349,7 +349,7 @@ at_pcbconnect(struct ddpcb *ddp, struct sockaddr *addr, struct proc *p) net = sat->sat_addr.s_net; } aa = 0; - if ( ifp = ro->ro_rt->rt_ifp ) { + if ((ifp = ro->ro_rt->rt_ifp) != NULL) { for ( aa = at_ifaddr; aa; aa = aa->aa_next ) { if ( aa->aa_ifp == ifp && ntohs( net ) >= ntohs( aa->aa_firstnet ) && diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c index a3609551b484..b4f9ce6e117b 100644 --- a/sys/netatm/atm_if.c +++ b/sys/netatm/atm_if.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $ + * @(#) $Id: atm_if.c,v 1.3 1998/12/04 22:54:52 archie Exp $ * */ @@ -38,7 +38,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $"); +__RCSID("@(#) $Id: atm_if.c,v 1.3 1998/12/04 22:54:52 archie Exp $"); #endif @@ -428,14 +428,14 @@ atm_physif_ioctl(code, data, arg) /* * Copy interface name into response */ - if ( err = copyout ( ifname, apsp->app_intf, IFNAMSIZ ) ) + if ((err = copyout ( ifname, apsp->app_intf, IFNAMSIZ)) != 0) break; /* * Copy counters */ - if ( err = copyout ( &pip->pif_ipdus, &apsp->app_ipdus, - len - sizeof ( apsp->app_intf ) ) ) + if ((err = copyout(&pip->pif_ipdus, &apsp->app_ipdus, + len - sizeof(apsp->app_intf))) != 0) break; /* @@ -524,8 +524,7 @@ atm_physif_ioctl(code, data, arg) } #endif - if ( err = atm_nif_attach ( nip ) ) - { + if ((err = atm_nif_attach(nip)) != 0) { atm_free ( (caddr_t)nip ); /* diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index 328b6be5a57f..261ea109ad2e 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $ + * @(#) $Id: atm_subr.c,v 1.3 1998/10/31 20:06:54 phk Exp $ * */ @@ -38,7 +38,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $"); +__RCSID("@(#) $Id: atm_subr.c,v 1.3 1998/10/31 20:06:54 phk Exp $"); #endif @@ -54,7 +54,7 @@ struct ifqueue atm_intrq; #ifdef sgi int atm_intr_index; #endif -struct atm_sock_stat atm_sock_stat = {0}; +struct atm_sock_stat atm_sock_stat = { { 0 } }; int atm_init = 0; int atm_debug = 0; int atm_dev_print = 0; diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c index 278d9f8f8574..00a4e38cebe4 100644 --- a/sys/netatm/atm_usrreq.c +++ b/sys/netatm/atm_usrreq.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $ + * @(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $ * */ @@ -38,7 +38,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $"); +__RCSID("@(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $"); #endif @@ -515,7 +515,7 @@ atm_dgram_info(data) * Get ARP table information */ for (pip = atm_interface_head; pip; pip = pip->pif_next) { - if (smp = pip->pif_sigmgr) { + if ((smp = pip->pif_sigmgr) != NULL) { err = (*smp->sm_ioctl)(AIOCS_INF_ARP, data, (caddr_t)pip->pif_siginst); } @@ -533,7 +533,7 @@ atm_dgram_info(data) * Interface specified */ if ((nip = atm_nifname(aip->air_asrv_intf))) { - if (smp = nip->nif_pif->pif_sigmgr) { + if ((smp = nip->nif_pif->pif_sigmgr) != NULL) { err = (*smp->sm_ioctl)(AIOCS_INF_ASV, data, (caddr_t)nip); } @@ -546,7 +546,7 @@ atm_dgram_info(data) */ for (pip = atm_interface_head; pip; pip = pip->pif_next) { - if (smp = pip->pif_sigmgr) { + if ((smp = pip->pif_sigmgr) != NULL) { for (nip = pip->pif_nif; nip; nip = nip->nif_pnext) { err = (*smp->sm_ioctl) @@ -599,7 +599,7 @@ atm_dgram_info(data) * Interface specified */ if ((pip = atm_pifname(aip->air_vcc_intf))) { - if (smp = pip->pif_sigmgr) { + if ((smp = pip->pif_sigmgr) != NULL) { err = (*smp->sm_ioctl)(AIOCS_INF_VCC, data, (caddr_t)pip->pif_siginst); @@ -613,7 +613,7 @@ atm_dgram_info(data) */ for (pip = atm_interface_head; pip; pip = pip->pif_next) { - if (smp = pip->pif_sigmgr) { + if ((smp = pip->pif_sigmgr) != NULL) { err = (*smp->sm_ioctl)(AIOCS_INF_VCC, data, (caddr_t)pip->pif_siginst); @@ -694,9 +694,9 @@ atm_dgram_info(data) err = ENOSPC; break; } - if (err = copyout((caddr_t)&atm_version, + if ((err = copyout((caddr_t)&atm_version, aip->air_buf_addr, - sizeof(atm_version))) { + sizeof(atm_version))) != 0) { break; } aip->air_buf_addr += sizeof(atm_version); diff --git a/sys/netatm/ipatm/ipatm_load.c b/sys/netatm/ipatm/ipatm_load.c index 38254150b1e2..f82d984ca705 100644 --- a/sys/netatm/ipatm/ipatm_load.c +++ b/sys/netatm/ipatm/ipatm_load.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $ + * @(#) $Id: ipatm_load.c,v 1.2 1998/10/31 20:06:55 phk Exp $ * */ @@ -46,7 +46,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $"); +__RCSID("@(#) $Id: ipatm_load.c,v 1.2 1998/10/31 20:06:55 phk Exp $"); #endif @@ -501,9 +501,9 @@ ipatm_start() /* * Now start listening */ - if (err = atm_cm_listen(&ipatm_endpt, (void *)i, + if ((err = atm_cm_listen(&ipatm_endpt, (void *)i, &ipatm_listeners[i].attr, - &ipatm_listeners[i].conn)) + &ipatm_listeners[i].conn)) != 0) goto done; } @@ -569,7 +569,7 @@ ipatm_stop() /* * Detach all our interfaces */ - while (inp = ipatm_nif_head) { + while ((inp = ipatm_nif_head) != NULL) { (void) ipatm_nifstat(NCM_DETACH, inp->inf_nif, 0); } diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c index b3af607af6a1..7cdef3f4e995 100644 --- a/sys/netatm/sigpvc/sigpvc_if.c +++ b/sys/netatm/sigpvc/sigpvc_if.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $ + * @(#) $Id: sigpvc_if.c,v 1.4 1999/01/19 23:11:39 mks Exp $ * */ @@ -46,7 +46,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $"); +__RCSID("@(#) $Id: sigpvc_if.c,v 1.4 1999/01/19 23:11:39 mks Exp $"); #endif @@ -639,7 +639,7 @@ sigpvc_ioctl(code, data, arg1) /* * Copy data to user buffer and update buffer info */ - if (err = copyout((caddr_t)&avr, cp, sizeof(avr))) + if ((err = copyout((caddr_t)&avr, cp, sizeof(avr))) != 0) break; cp += sizeof(avr); space -= sizeof(avr); diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c index d2d65e6c3879..b291e55f8301 100644 --- a/sys/netatm/spans/spans_arp.c +++ b/sys/netatm/spans/spans_arp.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: spans_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $ + * @(#) $Id: spans_arp.c,v 1.4 1999/01/19 23:11:40 mks Exp $ * */ @@ -44,7 +44,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: spans_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $"); +__RCSID("@(#) $Id: spans_arp.c,v 1.4 1999/01/19 23:11:40 mks Exp $"); #endif @@ -1108,8 +1108,8 @@ spansarp_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&aar, buf_addr, - sizeof(aar))) + if ((err = copyout((caddr_t)&aar, buf_addr, + sizeof(aar))) != 0) break; buf_addr += sizeof(aar); buf_len -= sizeof(aar); diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c index 17dc135fc547..24dd44f2b725 100644 --- a/sys/netatm/spans/spans_cls.c +++ b/sys/netatm/spans/spans_cls.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: spans_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $ + * @(#) $Id: spans_cls.c,v 1.3 1998/12/04 22:54:53 archie Exp $ * */ @@ -44,7 +44,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: spans_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $"); +__RCSID("@(#) $Id: spans_cls.c,v 1.3 1998/12/04 22:54:53 archie Exp $"); #endif @@ -703,7 +703,7 @@ spanscls_cpcs_data(tok, m) /* * Packet is ready for input to IP */ - if (inp = clp->cls_ipnif) + if ((inp = clp->cls_ipnif) != NULL) (void) (*inp->inf_ipinput)(inp, m); else KB_FREEALL(m); diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c index 4557f26a662d..12c9a163bbb7 100644 --- a/sys/netatm/spans/spans_if.c +++ b/sys/netatm/spans/spans_if.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: spans_if.c,v 1.3 1998/10/31 20:06:56 phk Exp $ + * @(#) $Id: spans_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $ * */ @@ -46,7 +46,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: spans_if.c,v 1.3 1998/10/31 20:06:56 phk Exp $"); +__RCSID("@(#) $Id: spans_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $"); #endif /* @@ -428,7 +428,7 @@ spans_detach(pip) /* * Now close the SPANS signalling VCC */ - if (cop = spp->sp_conn) { + if ((cop = spp->sp_conn) != NULL) { err = atm_cm_release(cop, &spans_cause); if (err) ATM_DEBUG2( @@ -727,7 +727,7 @@ spans_reject(vcp, errp) * Clean up the VCCB--the connection manager will free it * spans_close_vcc will send a SPANS open response */ - if (*errp = spans_close_vcc(spp, svp, TRUE)) { + if ((*errp = spans_close_vcc(spp, svp, TRUE)) != 0) { ATM_DEBUG0("spans_reject: spans_close_vcc failed\n"); return(CALL_FAILED); } @@ -1018,8 +1018,8 @@ spans_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&rsp, buf_addr, - sizeof(rsp))) + if ((err = copyout((caddr_t)&rsp, buf_addr, + sizeof(rsp))) != 0) break; buf_addr += sizeof(rsp); buf_len -= sizeof(rsp); diff --git a/sys/netatm/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c index f04cc7fb3bed..486da9ae4745 100644 --- a/sys/netatm/spans/spans_msg.c +++ b/sys/netatm/spans/spans_msg.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: spans_msg.c,v 1.2 1998/09/17 09:35:00 phk Exp $ + * @(#) $Id: spans_msg.c,v 1.3 1998/10/31 20:06:56 phk Exp $ * */ @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: spans_msg.c,v 1.2 1998/09/17 09:35:00 phk Exp $"); +__RCSID("@(#) $Id: spans_msg.c,v 1.3 1998/10/31 20:06:56 phk Exp $"); #endif /* @@ -545,7 +545,7 @@ spans_open_req(spp, msg) /* * See if the connection is new */ - if (svp = spans_find_conn(spp, &msg->sm_open_req.opreq_conn)) { + if ((svp = spans_find_conn(spp, &msg->sm_open_req.opreq_conn)) != NULL) { /* * We already have a VCCB that matches the connection in * the request diff --git a/sys/netatm/spans/spans_print.c b/sys/netatm/spans/spans_print.c index 99e8c94b1828..4068be94c233 100644 --- a/sys/netatm/spans/spans_print.c +++ b/sys/netatm/spans/spans_print.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $ + * @(#) $Id: spans_print.c,v 1.4 1998/12/04 22:54:53 archie Exp $ * */ @@ -41,7 +41,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $"); +__RCSID("@(#) $Id: spans_print.c,v 1.4 1998/12/04 22:54:53 archie Exp $"); #endif /* @@ -1067,6 +1067,8 @@ spans_print_msgbody(objp) rccnf_p->rccnf_conn.con_dsap, rccnf_p->rccnf_conn.con_ssap); break; + default: + break; } printf("\n"); } diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c index b73452442346..9f6824b81abc 100644 --- a/sys/netatm/uni/sscf_uni.c +++ b/sys/netatm/uni/sscf_uni.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $ + * @(#) $Id: sscf_uni.c,v 1.4 1998/12/04 22:54:53 archie Exp $ * */ @@ -43,7 +43,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $"); +__RCSID("@(#) $Id: sscf_uni.c,v 1.4 1998/12/04 22:54:53 archie Exp $"); #endif @@ -107,7 +107,7 @@ sscf_uni_start() /* * Register stack service */ - if (err = atm_stack_register(&sscf_uni_service)) + if ((err = atm_stack_register(&sscf_uni_service)) != 0) goto done; done: diff --git a/sys/netatm/uni/sscop_subr.c b/sys/netatm/uni/sscop_subr.c index 16ad1395a243..44d0808aa09b 100644 --- a/sys/netatm/uni/sscop_subr.c +++ b/sys/netatm/uni/sscop_subr.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $ + * @(#) $Id: sscop_subr.c,v 1.3 1998/10/31 20:07:00 phk Exp $ * */ @@ -44,7 +44,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $"); +__RCSID("@(#) $Id: sscop_subr.c,v 1.3 1998/10/31 20:07:00 phk Exp $"); #endif @@ -297,7 +297,7 @@ sscop_rexmit_insert(sop, php) * Otherwise, loop thru the queue until we find the * proper insertion point for the PDU */ - while (next = curr->ph_rexmit_lk) { + while ((next = curr->ph_rexmit_lk) != NULL) { if (SEQ_LT(seq, next->ph_ns, sop->so_ack)) { php->ph_rexmit_lk = next; curr->ph_rexmit_lk = php; @@ -396,7 +396,7 @@ sscop_xmit_drain(sop) /* * Free transmission queue buffers */ - while (m = sop->so_xmit_hd) { + while ((m = sop->so_xmit_hd) != NULL) { sop->so_xmit_hd = KB_QNEXT(m); KB_FREEALL(m); } @@ -415,7 +415,7 @@ sscop_xmit_drain(sop) /* * Free pending ack queue buffers */ - while (php = sop->so_pack_hd) { + while ((php = sop->so_pack_hd) != NULL) { sop->so_pack_hd = php->ph_pack_lk; KB_FREEALL(php->ph_buf); } @@ -475,7 +475,7 @@ sscop_recv_insert(sop, php) * to make sure there isn't a PDU already on the queue * with a matching sequence number. */ - while (next = curr->ph_recv_lk) { + while ((next = curr->ph_recv_lk) != NULL) { if (SEQ_LT(seq, next->ph_ns, sop->so_rcvnext)) { if (seq == curr->ph_ns) return (1); @@ -518,7 +518,7 @@ sscop_rcvr_drain(sop) /* * Free receive queue buffers */ - while (php = sop->so_recv_hd) { + while ((php = sop->so_recv_hd) != NULL) { sop->so_recv_hd = php->ph_recv_lk; KB_FREEALL(php->ph_buf); } @@ -557,7 +557,7 @@ sscop_service_xmit(sop) * (Congestion control will be added later) */ while (1) { - if (php = sop->so_rexmit_hd) { + if ((php = sop->so_rexmit_hd) != NULL) { /* * Send SD PDU from retransmit queue diff --git a/sys/netatm/uni/sscop_timer.c b/sys/netatm/uni/sscop_timer.c index 087ae79e96cd..e6b1b906d7f2 100644 --- a/sys/netatm/uni/sscop_timer.c +++ b/sys/netatm/uni/sscop_timer.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $ + * @(#) $Id: sscop_timer.c,v 1.3 1998/10/31 20:07:00 phk Exp $ * */ @@ -44,7 +44,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $"); +__RCSID("@(#) $Id: sscop_timer.c,v 1.3 1998/10/31 20:07:00 phk Exp $"); #endif @@ -101,7 +101,7 @@ sscop_timeout(tip) * If an expired timer is found, notify that entry. */ sprev = &sscop_head; - while (sop = *sprev) { + while ((sop = *sprev) != NULL) { /* * Check out each timer diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c index 2d6006f802b3..48140996665f 100644 --- a/sys/netatm/uni/uniarp.c +++ b/sys/netatm/uni/uniarp.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $ + * @(#) $Id: uniarp.c,v 1.5 1999/01/19 23:16:11 mks Exp $ * */ @@ -43,7 +43,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $"); +__RCSID("@(#) $Id: uniarp.c,v 1.5 1999/01/19 23:16:11 mks Exp $"); #endif @@ -425,7 +425,7 @@ uniarp_server_mode(uip) * We're becoming the server, so kill the pending connection */ UNIIP_ARP_CANCEL(uip); - if (ivp = uip->uip_arpsvrvcc) { + if ((ivp = uip->uip_arpsvrvcc) != NULL) { ivp->iv_flags &= ~IVF_NOIDLE; uip->uip_arpsvrvcc = NULL; (*ivp->iv_ipnif->inf_arpnotify)(ivp, MAP_FAILED); @@ -556,7 +556,7 @@ uniarp_client_mode(uip, aap) * We're changing servers, so kill the pending connection */ UNIIP_ARP_CANCEL(uip); - if (ivp = uip->uip_arpsvrvcc) { + if ((ivp = uip->uip_arpsvrvcc) != NULL) { ivp->iv_flags &= ~IVF_NOIDLE; uip->uip_arpsvrvcc = NULL; (*ivp->iv_ipnif->inf_arpnotify)(ivp, MAP_FAILED); @@ -1040,8 +1040,8 @@ uniarp_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&aar, buf_addr, - sizeof(aar))) + if ((err = copyout((caddr_t)&aar, buf_addr, + sizeof(aar))) != 0) break; buf_addr += sizeof(aar); buf_len -= sizeof(aar); @@ -1090,8 +1090,8 @@ uniarp_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&aar, buf_addr, - sizeof(aar))) + if ((err = copyout((caddr_t)&aar, buf_addr, + sizeof(aar))) != 0) break; buf_addr += sizeof(aar); buf_len -= sizeof(aar); @@ -1176,7 +1176,7 @@ uniarp_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&asr, buf_addr, sizeof(asr))) + if ((err = copyout((caddr_t)&asr, buf_addr, sizeof(asr))) != 0) break; buf_addr += sizeof(asr); buf_len -= sizeof(asr); @@ -1191,7 +1191,7 @@ uniarp_ioctl(code, data, arg1) err = ENOSPC; break; } - if (err = copyout(uip->uip_prefix, buf_addr, i)) + if ((err = copyout(uip->uip_prefix, buf_addr, i)) != 0) break; buf_addr += i; buf_len -= i; diff --git a/sys/netatm/uni/uniarp_input.c b/sys/netatm/uni/uniarp_input.c index b621ac35c541..80920292226f 100644 --- a/sys/netatm/uni/uniarp_input.c +++ b/sys/netatm/uni/uniarp_input.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $ + * @(#) $Id: uniarp_input.c,v 1.3 1998/12/04 22:54:53 archie Exp $ * */ @@ -43,7 +43,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $"); +__RCSID("@(#) $Id: uniarp_input.c,v 1.3 1998/12/04 22:54:53 archie Exp $"); #endif @@ -122,7 +122,7 @@ uniarp_cpcs_data(tok, m) /* * Verify/gather source address fields */ - if (len = (ahp->ah_shtl & ARP_TL_LMASK)) { + if ((len = (ahp->ah_shtl & ARP_TL_LMASK)) != 0) { if (ahp->ah_shtl & ARP_TL_E164) { if (len > sizeof(struct atm_addr_e164)) goto bad; @@ -141,7 +141,7 @@ uniarp_cpcs_data(tok, m) satm.address_length = 0; } - if (len = (ahp->ah_sstl & ARP_TL_LMASK)) { + if ((len = (ahp->ah_sstl & ARP_TL_LMASK)) != 0) { if (((ahp->ah_sstl & ARP_TL_TMASK) != ARP_TL_NSAPA) || (len != sizeof(struct atm_addr_nsap))) goto bad; @@ -155,7 +155,7 @@ uniarp_cpcs_data(tok, m) satmsub.address_length = 0; } - if (len = ahp->ah_spln) { + if ((len = ahp->ah_spln) != 0) { if (len != sizeof(struct in_addr)) goto bad; if (KB_COPYDATA(m, plen, len, (caddr_t)&sip)) @@ -168,7 +168,7 @@ uniarp_cpcs_data(tok, m) /* * Verify/gather target address fields */ - if (len = (ahp->ah_thtl & ARP_TL_LMASK)) { + if ((len = (ahp->ah_thtl & ARP_TL_LMASK)) != 0) { if (ahp->ah_thtl & ARP_TL_E164) { if (len > sizeof(struct atm_addr_e164)) goto bad; @@ -187,7 +187,7 @@ uniarp_cpcs_data(tok, m) tatm.address_length = 0; } - if (len = (ahp->ah_tstl & ARP_TL_LMASK)) { + if ((len = (ahp->ah_tstl & ARP_TL_LMASK)) != 0) { if (((ahp->ah_tstl & ARP_TL_TMASK) != ARP_TL_NSAPA) || (len != sizeof(struct atm_addr_nsap))) goto bad; @@ -201,7 +201,7 @@ uniarp_cpcs_data(tok, m) tatmsub.address_length = 0; } - if (len = ahp->ah_tpln) { + if ((len = ahp->ah_tpln) != 0) { if (len != sizeof(struct in_addr)) goto bad; if (KB_COPYDATA(m, plen, len, (caddr_t)&tip)) diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c index dd7bc3e3f807..88e79a020487 100644 --- a/sys/netatm/uni/uniip.c +++ b/sys/netatm/uni/uniip.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $ + * @(#) $Id: uniip.c,v 1.2 1998/10/31 20:07:00 phk Exp $ * */ @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $"); +__RCSID("@(#) $Id: uniip.c,v 1.2 1998/10/31 20:07:00 phk Exp $"); #endif @@ -68,7 +68,7 @@ struct ip_serv uniip_ipserv = { uniarp_svcactive, uniarp_vcclose, NULL, - {ATM_AAL5, ATM_ENC_LLC}, + { { ATM_AAL5, ATM_ENC_LLC} }, }; diff --git a/sys/netatm/uni/unisig_if.c b/sys/netatm/uni/unisig_if.c index 0401154fa803..33bfb488dc83 100644 --- a/sys/netatm/uni/unisig_if.c +++ b/sys/netatm/uni/unisig_if.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $ + * @(#) $Id: unisig_if.c,v 1.5 1998/12/11 21:47:46 phk Exp $ * */ @@ -47,7 +47,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $"); +__RCSID("@(#) $Id: unisig_if.c,v 1.5 1998/12/11 21:47:46 phk Exp $"); #endif @@ -936,8 +936,8 @@ unisig_ioctl(code, data, arg1) /* * Copy the response into the user's buffer */ - if (err = copyout((caddr_t)&rsp, buf_addr, - sizeof(rsp))) + if ((err = copyout((caddr_t)&rsp, buf_addr, + sizeof(rsp))) != 0) break; buf_addr += sizeof(rsp); buf_len -= sizeof(rsp); diff --git a/sys/netatm/uni/unisig_mbuf.c b/sys/netatm/uni/unisig_mbuf.c index b96a636a4be8..c7f00912c9e3 100644 --- a/sys/netatm/uni/unisig_mbuf.c +++ b/sys/netatm/uni/unisig_mbuf.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $ + * @(#) $Id: unisig_mbuf.c,v 1.3 1998/10/31 20:07:01 phk Exp $ * */ @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $"); +__RCSID("@(#) $Id: unisig_mbuf.c,v 1.3 1998/10/31 20:07:01 phk Exp $"); #endif @@ -229,9 +229,9 @@ usf_short(usf, s) if (usf->usf_op == USF_ENCODE) tval.value = htons(*s); - if (rc = usf_byte(usf, &tval.b[0])) + if ((rc = usf_byte(usf, &tval.b[0])) != 0) return(rc); - if (rc = usf_byte(usf, &tval.b[1])) + if ((rc = usf_byte(usf, &tval.b[1])) != 0) return(rc); if (usf->usf_op == USF_DECODE) diff --git a/sys/netatm/uni/unisig_msg.h b/sys/netatm/uni/unisig_msg.h index 4be014488637..1305bc77e0de 100644 --- a/sys/netatm/uni/unisig_msg.h +++ b/sys/netatm/uni/unisig_msg.h @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: unisig_msg.h,v 1.8 1998/08/26 23:29:23 mks Exp $ + * @(#) $Id: unisig_msg.h,v 1.1 1998/09/15 08:23:11 phk Exp $ * */ @@ -114,8 +114,8 @@ struct unisig_msg { #define EXTRACT_CREF(x) \ ((x) & UNI_MSG_CALL_REF_RMT ? (x) & UNI_MSG_CALL_REF_MASK : (x) | UNI_MSG_CALL_REF_RMT) -#define GLOBAL_CREF(x) ((x) & UNI_MSG_CALL_REF_MASK == UNI_MSG_CALL_REF_GLOBAL) -#define DUMMY_CREF(x) ((x) & UNI_MSG_CALL_REF_MASK == UNI_MSG_CALL_REF_DUMMY) +#define GLOBAL_CREF(x) (((x) & UNI_MSG_CALL_REF_MASK) == UNI_MSG_CALL_REF_GLOBAL) +#define DUMMY_CREF(x) (((x) & UNI_MSG_CALL_REF_MASK) == UNI_MSG_CALL_REF_DUMMY) #define UNI_MSG_TYPE_FLAG_MASK 1 #define UNI_MSG_TYPE_FLAG_SHIFT 4 diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index d604ad06a88b..cdd5a604a12f 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 - * $Id: in_pcb.c,v 1.45 1998/09/17 18:42:16 fenner Exp $ + * $Id: in_pcb.c,v 1.46 1998/12/07 21:58:37 archie Exp $ */ #include @@ -439,7 +439,7 @@ in_pcbconnect(inp, nam, p) /* * Call inner routine, to assign local interface address. */ - if (error = in_pcbladdr(inp, nam, &ifaddr)) + if ((error = in_pcbladdr(inp, nam, &ifaddr)) != 0) return(error); if (in_pcblookup_hash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port, diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index e495b60450b0..76f4e283c17a 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -10,7 +10,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_dummynet.c,v 1.6 1999/01/12 16:40:57 eivind Exp $ + * $Id: ip_dummynet.c,v 1.7 1999/01/12 16:43:52 eivind Exp $ */ /* @@ -137,7 +137,7 @@ dn_move(struct dn_pipe *pipe, int immediate) /* this ought to go in dn_dequeue() */ if (!immediate && pipe->ticks_from_last_insert < pipe->delay) pipe->ticks_from_last_insert++; - if ( pkt = pipe->r.head ) { + if ((pkt = pipe->r.head) != NULL) { /* * Move at most numbytes bytes from src and move to dst. * delay is set to ticks_from_last_insert, which diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 0d775ea931bc..b75a51cebc4c 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_input.c,v 1.111 1999/01/12 12:25:00 eivind Exp $ + * $Id: ip_input.c,v 1.112 1999/01/22 16:50:45 wollman Exp $ * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $ */ @@ -129,7 +129,7 @@ SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RD, #define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) #define IPREASS_HMASK (IPREASS_NHASH - 1) #define IPREASS_HASH(x,y) \ - ((((x) & 0xF | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) + (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) static struct ipq ipq[IPREASS_NHASH]; static int nipq = 0; /* total # of reass queues */ diff --git a/sys/netinet/ip_proxy.c b/sys/netinet/ip_proxy.c index fe18abb60d97..31764298d50b 100644 --- a/sys/netinet/ip_proxy.c +++ b/sys/netinet/ip_proxy.c @@ -6,7 +6,7 @@ * to the original author and the contributors. */ #if !defined(lint) -static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 1.2 1998/03/21 11:34:23 peter Exp $"; +static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 1.3 1998/06/20 18:37:50 peter Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) @@ -127,13 +127,13 @@ u_short sport, dport; { if (aps->aps_dst.s_addr == dst.s_addr) { if ((aps->aps_src.s_addr == src.s_addr) && - (!tcp || (sport == aps->aps_sport) && - (dport == aps->aps_dport))) + (!tcp || ((sport == aps->aps_sport) && + (dport == aps->aps_dport)))) return 1; } else if (aps->aps_dst.s_addr == src.s_addr) { if ((aps->aps_src.s_addr == dst.s_addr) && - (!tcp || (sport == aps->aps_dport) && - (dport == aps->aps_sport))) + (!tcp || ((sport == aps->aps_dport) && + (dport == aps->aps_sport)))) return 1; } return 0; diff --git a/sys/netinet/ip_state.c b/sys/netinet/ip_state.c index 5545b3daea0f..b6a805496135 100644 --- a/sys/netinet/ip_state.c +++ b/sys/netinet/ip_state.c @@ -7,7 +7,7 @@ */ #if !defined(lint) static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.3 1998/06/20 18:37:51 peter Exp $"; +static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.4 1998/11/26 18:54:52 eivind Exp $"; #endif #include "opt_ipfilter.h" @@ -478,8 +478,8 @@ u_short sp, dp; (!out && is->is_ifpin == ifp)) && (is->is_dst.s_addr == dst.s_addr) && (is->is_src.s_addr == src.s_addr) && - (!tcp || (sp == is->is_sport) && - (dp == is->is_dport))) { + (!tcp || ((sp == is->is_sport) && + (dp == is->is_dport)))) { ret = 1; } } else { @@ -487,8 +487,8 @@ u_short sp, dp; (!out && is->is_ifpout == ifp)) && (is->is_dst.s_addr == src.s_addr) && (is->is_src.s_addr == dst.s_addr) && - (!tcp || (sp == is->is_dport) && - (dp == is->is_sport))) { + (!tcp || ((sp == is->is_dport) && + (dp == is->is_sport)))) { ret = 1; } } diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 97d1983b0078..41454a4939ca 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 - * $Id: tcp_input.c,v 1.81 1998/09/11 16:04:03 wollman Exp $ + * $Id: tcp_input.c,v 1.82 1998/12/03 20:23:20 dillon Exp $ */ #include "opt_ipfw.h" /* for ipfw_fwd */ @@ -530,7 +530,7 @@ tcp_input(m, iphlen) * if the segment has a CC option equal to CCrecv */ ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) || - (to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv) && + ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) && ti->ti_seq == tp->rcv_nxt && tiwin && tiwin == tp->snd_wnd && tp->snd_nxt == tp->snd_max) { diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 97d1983b0078..41454a4939ca 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 - * $Id: tcp_input.c,v 1.81 1998/09/11 16:04:03 wollman Exp $ + * $Id: tcp_input.c,v 1.82 1998/12/03 20:23:20 dillon Exp $ */ #include "opt_ipfw.h" /* for ipfw_fwd */ @@ -530,7 +530,7 @@ tcp_input(m, iphlen) * if the segment has a CC option equal to CCrecv */ ((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) || - (to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv) && + ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) && ti->ti_seq == tp->rcv_nxt && tiwin && tiwin == tp->snd_wnd && tp->snd_nxt == tp->snd_max) { diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 13f336082c3b..2796068138cd 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -33,7 +33,7 @@ * * @(#)spx_usrreq.h * - * $Id: spx_usrreq.c,v 1.21 1998/12/07 21:58:42 archie Exp $ + * $Id: spx_usrreq.c,v 1.22 1999/01/12 12:37:18 eivind Exp $ */ #include @@ -463,9 +463,9 @@ register struct spx *si; update_window: if (SSEQ_LT(cb->s_snxt, cb->s_rack)) cb->s_snxt = cb->s_rack; - if (SSEQ_LT(cb->s_swl1, si->si_seq) || cb->s_swl1 == si->si_seq && - (SSEQ_LT(cb->s_swl2, si->si_ack) || - cb->s_swl2 == si->si_ack && SSEQ_LT(cb->s_ralo, si->si_alo))) { + if (SSEQ_LT(cb->s_swl1, si->si_seq) || (cb->s_swl1 == si->si_seq && + (SSEQ_LT(cb->s_swl2, si->si_ack)) || + (cb->s_swl2 == si->si_ack && SSEQ_LT(cb->s_ralo, si->si_alo)))) { /* keep track of pure window updates */ if ((si->si_cc & SPX_SP) && cb->s_swl2 == si->si_ack && SSEQ_LT(cb->s_ralo, si->si_alo)) { diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c index 6c9cfb7a4c0f..5544bf253a56 100644 --- a/sys/nfs/nfs_common.c +++ b/sys/nfs/nfs_common.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 - * $Id: nfs_subs.c,v 1.70 1999/01/05 18:49:58 eivind Exp $ + * $Id: nfs_subs.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -1254,7 +1254,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) md = *mdp; t1 = (mtod(md, caddr_t) + md->m_len) - *dposp; - if (error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) + if ((error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) != 0) return (error); fp = (struct nfs_fattr *)cp2; if (v3) { @@ -2032,7 +2032,7 @@ netaddr_match(family, haddr, nam) return (0); } -static nfsuint64 nfs_nullcookie = { 0, 0 }; +static nfsuint64 nfs_nullcookie = { { 0, 0 } }; /* * This function finds the directory cookie that corresponds to the * logical byte offset given. diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 6c9cfb7a4c0f..5544bf253a56 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 - * $Id: nfs_subs.c,v 1.70 1999/01/05 18:49:58 eivind Exp $ + * $Id: nfs_subs.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -1254,7 +1254,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) md = *mdp; t1 = (mtod(md, caddr_t) + md->m_len) - *dposp; - if (error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) + if ((error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) != 0) return (error); fp = (struct nfs_fattr *)cp2; if (v3) { @@ -2032,7 +2032,7 @@ netaddr_match(family, haddr, nam) return (0); } -static nfsuint64 nfs_nullcookie = { 0, 0 }; +static nfsuint64 nfs_nullcookie = { { 0, 0 } }; /* * This function finds the directory cookie that corresponds to the * logical byte offset given. diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 8b85b9b22bd9..5050ec8f1ed0 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.43 1998/09/01 02:31:52 luoqi Exp $ + * $Id: nfs_syscalls.c,v 1.44 1998/12/07 21:58:44 archie Exp $ */ #include @@ -791,7 +791,7 @@ nfsrv_zapsock(slp) if (slp->ns_nam) FREE(slp->ns_nam, M_SONAME); m_freem(slp->ns_raw); - while (rec = STAILQ_FIRST(&slp->ns_rec)) { + while ((rec = STAILQ_FIRST(&slp->ns_rec)) != NULL) { STAILQ_REMOVE_HEAD(&slp->ns_rec, nr_link); if (rec->nr_address) FREE(rec->nr_address, M_SONAME); diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 8b85b9b22bd9..5050ec8f1ed0 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.43 1998/09/01 02:31:52 luoqi Exp $ + * $Id: nfs_syscalls.c,v 1.44 1998/12/07 21:58:44 archie Exp $ */ #include @@ -791,7 +791,7 @@ nfsrv_zapsock(slp) if (slp->ns_nam) FREE(slp->ns_nam, M_SONAME); m_freem(slp->ns_raw); - while (rec = STAILQ_FIRST(&slp->ns_rec)) { + while ((rec = STAILQ_FIRST(&slp->ns_rec)) != NULL) { STAILQ_REMOVE_HEAD(&slp->ns_rec, nr_link); if (rec->nr_address) FREE(rec->nr_address, M_SONAME); diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 6c9cfb7a4c0f..5544bf253a56 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 - * $Id: nfs_subs.c,v 1.70 1999/01/05 18:49:58 eivind Exp $ + * $Id: nfs_subs.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -1254,7 +1254,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) md = *mdp; t1 = (mtod(md, caddr_t) + md->m_len) - *dposp; - if (error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) + if ((error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) != 0) return (error); fp = (struct nfs_fattr *)cp2; if (v3) { @@ -2032,7 +2032,7 @@ netaddr_match(family, haddr, nam) return (0); } -static nfsuint64 nfs_nullcookie = { 0, 0 }; +static nfsuint64 nfs_nullcookie = { { 0, 0 } }; /* * This function finds the directory cookie that corresponds to the * logical byte offset given. diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 6c9cfb7a4c0f..5544bf253a56 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 - * $Id: nfs_subs.c,v 1.70 1999/01/05 18:49:58 eivind Exp $ + * $Id: nfs_subs.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -1254,7 +1254,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) md = *mdp; t1 = (mtod(md, caddr_t) + md->m_len) - *dposp; - if (error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) + if ((error = nfsm_disct(mdp, dposp, NFSX_FATTR(v3), t1, &cp2)) != 0) return (error); fp = (struct nfs_fattr *)cp2; if (v3) { @@ -2032,7 +2032,7 @@ netaddr_match(family, haddr, nam) return (0); } -static nfsuint64 nfs_nullcookie = { 0, 0 }; +static nfsuint64 nfs_nullcookie = { { 0, 0 } }; /* * This function finds the directory cookie that corresponds to the * logical byte offset given. diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index 8b85b9b22bd9..5050ec8f1ed0 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.43 1998/09/01 02:31:52 luoqi Exp $ + * $Id: nfs_syscalls.c,v 1.44 1998/12/07 21:58:44 archie Exp $ */ #include @@ -791,7 +791,7 @@ nfsrv_zapsock(slp) if (slp->ns_nam) FREE(slp->ns_nam, M_SONAME); m_freem(slp->ns_raw); - while (rec = STAILQ_FIRST(&slp->ns_rec)) { + while ((rec = STAILQ_FIRST(&slp->ns_rec)) != NULL) { STAILQ_REMOVE_HEAD(&slp->ns_rec, nr_link); if (rec->nr_address) FREE(rec->nr_address, M_SONAME);