diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-27 21:50:00 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-27 21:50:00 +0000 |
commit | a40e0249d4e2495009cf3fb552bc428d0a8a8676 (patch) | |
tree | 4c208238f4839fac2a65719e0587b7b1583d6224 /sys/kern/kern_conf.c | |
parent | 143a811b84ef1bcf36b91153bfd028dca51265ef (diff) | |
download | FreeBSD-src-a40e0249d4e2495009cf3fb552bc428d0a8a8676.zip FreeBSD-src-a40e0249d4e2495009cf3fb552bc428d0a8a8676.tar.gz |
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index df832f6..e47459b 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_conf.c,v 1.28 1998/10/25 17:44:50 phk Exp $ + * $Id: kern_conf.c,v 1.29 1998/11/14 21:58:51 wollman Exp $ */ #include <sys/param.h> @@ -59,7 +59,7 @@ chrtoblk(dev_t dev) { struct cdevsw *cd; - if(cd = cdevsw[major(dev)]) { + if((cd = cdevsw[major(dev)]) != NULL) { if (cd->d_bmaj != -1) return(makedev(cd->d_bmaj,minor(dev))); } @@ -173,12 +173,12 @@ cdevsw_module_handler(module_t mod, int what, void *arg) switch (what) { case MOD_LOAD: - if (error = cdevsw_add(&data->dev, data->cdevsw, NULL)) + if ((error = cdevsw_add(&data->dev, data->cdevsw, NULL)) != 0) return error; break; case MOD_UNLOAD: - if (error = cdevsw_add(&data->dev, NULL, NULL)) + if ((error = cdevsw_add(&data->dev, NULL, NULL)) != 0) return error; break; } @@ -197,18 +197,18 @@ bdevsw_module_handler(module_t mod, int what, void* arg) switch (what) { case MOD_LOAD: - if (error = cdevsw_add(&data->cdev, data->cdevsw, NULL)) + if ((error = cdevsw_add(&data->cdev, data->cdevsw, NULL)) != 0) return error; - if (error = bdevsw_add(&data->bdev, data->cdevsw, NULL)) { + if ((error = bdevsw_add(&data->bdev, data->cdevsw, NULL)) != 0) { cdevsw_add(&data->bdev, NULL, NULL); return error; } break; case MOD_UNLOAD: - if (error = bdevsw_add(&data->bdev, NULL, NULL)) + if ((error = bdevsw_add(&data->bdev, NULL, NULL)) != 0) return error; - if (error = cdevsw_add(&data->cdev, NULL, NULL)) + if ((error = cdevsw_add(&data->cdev, NULL, NULL)) != 0) return error; break; } |