diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-27 20:09:21 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-27 20:09:21 +0000 |
commit | 0775a53cddb430a21259a269e0a7063ec0a1ee17 (patch) | |
tree | cb68685742f9729aa9c70ebcdc86355253673b77 /sys/geom | |
parent | 5c8fc4f2c43c35ac665320db4c7ab03e6193d120 (diff) | |
download | FreeBSD-src-0775a53cddb430a21259a269e0a7063ec0a1ee17.zip FreeBSD-src-0775a53cddb430a21259a269e0a7063ec0a1ee17.tar.gz |
Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors,
temporary.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_ccd.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 5963992..d516873 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.37 1998/09/15 08:15:26 gibbs Exp $ */ +/* $Id: ccd.c,v 1.38 1999/01/22 22:38:28 peter Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -332,8 +332,8 @@ ccdinit(ccd, cpaths, p) * Copy in the pathname of the component. */ bzero(tmppath, sizeof(tmppath)); /* sanity */ - if (error = copyinstr(cpaths[ix], tmppath, - MAXPATHLEN, &ci->ci_pathlen)) { + if ((error = copyinstr(cpaths[ix], tmppath, + MAXPATHLEN, &ci->ci_pathlen)) != 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) printf("ccd%d: can't copy path, error = %d\n", @@ -352,7 +352,7 @@ ccdinit(ccd, cpaths, p) /* * XXX: Cache the component's dev_t. */ - if (error = VOP_GETATTR(vp, &va, p->p_ucred, p)) { + if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)) != 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) printf("ccd%d: %s: getattr failed %s = %d\n", @@ -371,8 +371,8 @@ ccdinit(ccd, cpaths, p) /* * Get partition information for the component. */ - if (error = VOP_IOCTL(vp, DIOCGPART, (caddr_t)&dpart, - FREAD, p->p_ucred, p)) { + if ((error = VOP_IOCTL(vp, DIOCGPART, (caddr_t)&dpart, + FREAD, p->p_ucred, p)) != 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) printf("ccd%d: %s: ioctl failed, error = %d\n", @@ -632,7 +632,7 @@ ccdopen(dev, flags, fmt, p) return (ENXIO); cs = &ccd_softc[unit]; - if (error = ccdlock(cs)) + if ((error = ccdlock(cs)) != 0) return (error); lp = &cs->sc_dkdev.dk_label; @@ -693,7 +693,7 @@ ccdclose(dev, flags, fmt, p) return (ENXIO); cs = &ccd_softc[unit]; - if (error = ccdlock(cs)) + if ((error = ccdlock(cs)) != 0) return (error); part = ccdpart(dev); @@ -1076,7 +1076,7 @@ ccdioctl(dev, cmd, data, flag, p) if ((flag & FWRITE) == 0) return (EBADF); - if (error = ccdlock(cs)) + if ((error = ccdlock(cs)) != 0) return (error); /* Fill in some important bits. */ @@ -1131,7 +1131,7 @@ ccdioctl(dev, cmd, data, flag, p) if (ccddebug & CCDB_INIT) printf("ccdioctl: lookedup = %d\n", lookedup); #endif - if (error = ccdlookup(cpp[i], p, &vpp[i])) { + if ((error = ccdlookup(cpp[i], p, &vpp[i])) != 0) { for (j = 0; j < lookedup; ++j) (void)vn_close(vpp[j], FREAD|FWRITE, p->p_ucred, p); @@ -1149,7 +1149,7 @@ ccdioctl(dev, cmd, data, flag, p) /* * Initialize the ccd. Fills in the softc for us. */ - if (error = ccdinit(&ccd, cpp, p)) { + if ((error = ccdinit(&ccd, cpp, p)) != 0) { for (j = 0; j < lookedup; ++j) (void)vn_close(vpp[j], FREAD|FWRITE, p->p_ucred, p); @@ -1180,7 +1180,7 @@ ccdioctl(dev, cmd, data, flag, p) if ((flag & FWRITE) == 0) return (EBADF); - if (error = ccdlock(cs)) + if ((error = ccdlock(cs)) != 0) return (error); /* @@ -1267,7 +1267,7 @@ ccdioctl(dev, cmd, data, flag, p) if ((flag & FWRITE) == 0) return (EBADF); - if (error = ccdlock(cs)) + if ((error = ccdlock(cs)) != 0) return (error); cs->sc_flags |= CCDF_LABELLING; @@ -1363,7 +1363,7 @@ ccdlookup(path, p, vpp) int error; NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, path, p); - if (error = vn_open(&nd, FREAD|FWRITE, 0)) { + if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0) { #ifdef DEBUG if (ccddebug & CCDB_FOLLOW|CCDB_INIT) printf("ccdlookup: vn_open error = %d\n", error); @@ -1378,7 +1378,7 @@ ccdlookup(path, p, vpp) return (EBUSY); } - if (error = VOP_GETATTR(vp, &va, p->p_ucred, p)) { + if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)) != 0) { #ifdef DEBUG if (ccddebug & CCDB_FOLLOW|CCDB_INIT) printf("ccdlookup: getattr error = %d\n", error); @@ -1450,8 +1450,8 @@ ccdgetdisklabel(dev) /* * Call the generic disklabel extraction routine. */ - if (errstring = readdisklabel(CCDLABELDEV(dev), ccdstrategy, - &cs->sc_dkdev.dk_label)) + if ((errstring = readdisklabel(CCDLABELDEV(dev), ccdstrategy, + &cs->sc_dkdev.dk_label)) != NULL) ccdmakedisklabel(cs); #ifdef DEBUG |