diff options
54 files changed, 228 insertions, 223 deletions
diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 0a5a573..703708c 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $Id: coda_fbsd.c,v 1.11 1999/01/17 20:25:14 peter Exp $ + * $Id: coda_fbsd.c,v 1.12 1999/01/27 20:09:17 dillon Exp $ * */ @@ -84,7 +84,7 @@ int vcdebug = 1; #define VCDEBUG if (vcdebug) printf static int -codadev_modevent(module_t mod, modeventtype_t type, void *data) +codadev_modevent(module_t mod, int type, void *data) { dev_t dev; #ifdef DEVFS diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index c9534af..ec456f6 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -1,4 +1,4 @@ -/* $Id: brooktree848.c,v 1.61 1998/12/14 06:32:54 dillon Exp $ */ +/* $Id: brooktree848.c,v 1.62 1999/01/23 11:32:06 roger Exp $ */ /* BT848 Driver for Brooktree's Bt848 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and Jim Lowe's driver for the Matrox Meteor PCI card . The @@ -3184,7 +3184,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , /* must be Blue. */ start_skip = 0; if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 )) - switch ( ((uintptr_t) (void *) *target_buffer) % 4 ) { + switch ( ((uintptr_t) (volatile void *) *target_buffer) % 4 ) { case 2 : start_skip = 4 ; break; case 1 : start_skip = 8 ; break; } @@ -3207,7 +3207,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer; + *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer; *target_buffer += width * pixel_width; bktr->current_col += width; @@ -3238,7 +3238,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width / 2 - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer ; + *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer ; *target_buffer += (width * pixel_width / 2) ; if ( operation == OP_WRITE ) diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index c9c79ec..1d1de89 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -1,5 +1,5 @@ /* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */ -/* $Id: if_de.c,v 1.93 1998/12/30 00:37:43 hoek Exp $ */ +/* $Id: if_de.c,v 1.94 1999/01/27 23:45:41 dillon Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -2412,7 +2412,7 @@ tulip_srom_decode( /* * Save the hardware address. */ - bcopy((caddr_t) shp->sh_ieee802_address, (caddr_t) sc->tulip_enaddr, 6); + bcopy((v_caddr_t) shp->sh_ieee802_address, (v_caddr_t) sc->tulip_enaddr, 6); /* * If this is a multiple port card, add the adapter index to the last * byte of the hardware address. (if it isn't multiport, adding 0 diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 350546e..83deb25 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.59 1998/12/14 05:47:27 dillon Exp $ + * $Id: if_fxp.c,v 1.60 1999/01/27 23:45:42 dillon Exp $ */ /* @@ -1347,7 +1347,7 @@ fxp_init(xsc) #if defined(__NetBSD__) bcopy(LLADDR(ifp->if_sadl), (void *)cb_ias->macaddr, 6); #else - bcopy(sc->arpcom.ac_enaddr, (void *)cb_ias->macaddr, + bcopy(sc->arpcom.ac_enaddr, (volatile void *)cb_ias->macaddr, sizeof(sc->arpcom.ac_enaddr)); #endif /* __NetBSD__ */ @@ -1820,7 +1820,7 @@ fxp_mc_setup(sc) break; } bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - (void *) &sc->mcsp->mc_addr[nmcasts][0], 6); + (volatile void *) &sc->mcsp->mc_addr[nmcasts][0], 6); nmcasts++; } } diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index f13c919..3eedc8a 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -992,12 +992,12 @@ ugenpoll(dev, events, p) static int ugen_detach(device_t self) { - char *devinfo = (char *) device_get_desc(self); + const char *devinfo = device_get_desc(self); DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); if (devinfo) { device_set_desc(self, NULL); - free(devinfo, M_USB); + free((void *)devinfo, M_USB); } return 0; } diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 0a5a573..703708c 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $Id: coda_fbsd.c,v 1.11 1999/01/17 20:25:14 peter Exp $ + * $Id: coda_fbsd.c,v 1.12 1999/01/27 20:09:17 dillon Exp $ * */ @@ -84,7 +84,7 @@ int vcdebug = 1; #define VCDEBUG if (vcdebug) printf static int -codadev_modevent(module_t mod, modeventtype_t type, void *data) +codadev_modevent(module_t mod, int type, void *data) { dev_t dev; #ifdef DEVFS diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 514ba82..db5c341 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.30 1998/12/07 21:58:32 archie Exp $ + * $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ + * $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $ */ /* @@ -452,7 +452,7 @@ null_getattr(ap) { int error; - if (error = null_bypass((struct vop_generic_args *)ap)) + if ((error = null_bypass((struct vop_generic_args *)ap)) != 0) return (error); /* Requires that arguments be restored. */ ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c index 8d23b7e..f40ff33 100644 --- a/sys/gnu/ext2fs/ext2_bmap.c +++ b/sys/gnu/ext2fs/ext2_bmap.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 - * $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $ + * $Id: ufs_bmap.c,v 1.24 1998/10/27 11:47:08 bde Exp $ */ #include <sys/param.h> @@ -121,7 +121,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) mp = vp->v_mount; ump = VFSTOUFS(mp); #ifdef DIAGNOSTIC - if (ap != NULL && nump == NULL || ap == NULL && nump != NULL) + if ((ap != NULL && nump == NULL) || (ap == NULL && nump != NULL)) panic("ufs_bmaparray: invalid arguments"); #endif diff --git a/sys/gnu/fs/ext2fs/ext2_bmap.c b/sys/gnu/fs/ext2fs/ext2_bmap.c index 8d23b7e..f40ff33 100644 --- a/sys/gnu/fs/ext2fs/ext2_bmap.c +++ b/sys/gnu/fs/ext2fs/ext2_bmap.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 - * $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $ + * $Id: ufs_bmap.c,v 1.24 1998/10/27 11:47:08 bde Exp $ */ #include <sys/param.h> @@ -121,7 +121,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) mp = vp->v_mount; ump = VFSTOUFS(mp); #ifdef DIAGNOSTIC - if (ap != NULL && nump == NULL || ap == NULL && nump != NULL) + if ((ap != NULL && nump == NULL) || (ap == NULL && nump != NULL)) panic("ufs_bmaparray: invalid arguments"); #endif diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 2f36848..bb69fb6 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.93 1999/01/06 23:05:38 julian Exp $ + * $Id: kern_exec.c,v 1.94 1999/01/27 21:49:55 dillon Exp $ */ #include <sys/param.h> @@ -255,8 +255,8 @@ interpret: * Don't honor setuid/setgid if the filesystem prohibits it or if * the process is being traced. */ - if ((attr.va_mode & VSUID && p->p_ucred->cr_uid != attr.va_uid || - attr.va_mode & VSGID && p->p_ucred->cr_gid != attr.va_gid) && + if ((((attr.va_mode & VSUID) && p->p_ucred->cr_uid != attr.va_uid) || + ((attr.va_mode & VSGID) && p->p_ucred->cr_gid != attr.va_gid)) && (imgp->vp->v_mount->mnt_flag & MNT_NOSUID) == 0 && (p->p_flag & P_TRACED) == 0) { /* diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index f44fb1f..1185662 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $Id: kern_proc.c,v 1.43 1999/01/13 03:11:42 julian Exp $ + * $Id: kern_proc.c,v 1.44 1999/01/26 02:38:10 julian Exp $ */ #include <sys/param.h> @@ -376,7 +376,7 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump) register int i; for (i = 0; i <= pgrphash; i++) { - if (pgrp = pgrphashtbl[i].lh_first) { + if ((pgrp = pgrphashtbl[i].lh_first) != NULL) { printf("\tindx %d\n", i); for (; pgrp != 0; pgrp = pgrp->pg_hash.le_next) { printf( diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index e5e1a3e..728e430 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 - * $Id: kern_prot.c,v 1.42 1998/11/10 09:16:29 peter Exp $ + * $Id: kern_prot.c,v 1.43 1998/12/13 07:07:51 truckman Exp $ */ /* @@ -651,10 +651,10 @@ setreuid(p, uap) ruid = uap->ruid; euid = uap->euid; - if ((ruid != (uid_t)-1 && ruid != pc->p_ruid && ruid != pc->p_svuid || - euid != (uid_t)-1 && euid != pc->pc_ucred->cr_uid && - euid != pc->p_ruid && euid != pc->p_svuid) && - (error = suser(pc->pc_ucred, &p->p_acflag))) + if (((ruid != (uid_t)-1 && ruid != pc->p_ruid && ruid != pc->p_svuid) || + (euid != (uid_t)-1 && euid != pc->pc_ucred->cr_uid && + euid != pc->p_ruid && euid != pc->p_svuid)) && + (error = suser(pc->pc_ucred, &p->p_acflag)) != 0) return (error); if (euid != (uid_t)-1 && pc->pc_ucred->cr_uid != euid) { @@ -694,10 +694,10 @@ setregid(p, uap) rgid = uap->rgid; egid = uap->egid; - if ((rgid != (gid_t)-1 && rgid != pc->p_rgid && rgid != pc->p_svgid || - egid != (gid_t)-1 && egid != pc->pc_ucred->cr_groups[0] && - egid != pc->p_rgid && egid != pc->p_svgid) && - (error = suser(pc->pc_ucred, &p->p_acflag))) + if (((rgid != (gid_t)-1 && rgid != pc->p_rgid && rgid != pc->p_svgid) || + (egid != (gid_t)-1 && egid != pc->pc_ucred->cr_groups[0] && + egid != pc->p_rgid && egid != pc->p_svgid)) && + (error = suser(pc->pc_ucred, &p->p_acflag)) != 0) return (error); if (egid != (gid_t)-1 && pc->pc_ucred->cr_groups[0] != egid) { diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c index 27ba4bd..f99f8ad 100644 --- a/sys/kern/link_aout.c +++ b/sys/kern/link_aout.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_aout.c,v 1.17 1998/11/04 15:20:57 peter Exp $ + * $Id: link_aout.c,v 1.18 1999/01/25 08:42:24 dfr Exp $ */ #ifndef __alpha__ @@ -47,11 +47,11 @@ static int link_aout_load_module(const char*, linker_file_t*); static int link_aout_load_file(const char*, linker_file_t*); static int link_aout_lookup_symbol(linker_file_t, const char*, - linker_sym_t*); -static int link_aout_symbol_values(linker_file_t file, linker_sym_t sym, + c_linker_sym_t*); +static int link_aout_symbol_values(linker_file_t file, c_linker_sym_t sym, linker_symval_t* symval); static int link_aout_search_symbol(linker_file_t lf, caddr_t value, - linker_sym_t* sym, long* diffp); + c_linker_sym_t* sym, long* diffp); static void link_aout_unload_file(linker_file_t); static void link_aout_unload_module(linker_file_t); @@ -448,7 +448,7 @@ symbol_hash_value(aout_file_t af, const char* name) int link_aout_lookup_symbol(linker_file_t file, const char* name, - linker_sym_t* sym) + c_linker_sym_t* sym) { aout_file_t af = file->priv; long hashval; @@ -520,11 +520,11 @@ restart: static int -link_aout_symbol_values(linker_file_t file, linker_sym_t sym, +link_aout_symbol_values(linker_file_t file, c_linker_sym_t sym, linker_symval_t* symval) { aout_file_t af = file->priv; - struct nzlist* np = (struct nzlist*) sym; + const struct nzlist* np = (const struct nzlist*) sym; char* stringbase; long numsym = LD_STABSZ(af->dynamic) / sizeof(struct nzlist); struct nzlist *symbase; @@ -551,7 +551,7 @@ link_aout_symbol_values(linker_file_t file, linker_sym_t sym, static int link_aout_search_symbol(linker_file_t lf, caddr_t value, - linker_sym_t* sym, long* diffp) + c_linker_sym_t* sym, long* diffp) { aout_file_t af = lf->priv; u_long off = (uintptr_t) (void *) value; diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 91a78bf..7a87799 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_elf.c,v 1.13 1999/01/27 21:49:56 dillon Exp $ + * $Id: link_elf.c,v 1.14 1999/01/27 23:45:39 dillon Exp $ */ #include <sys/param.h> @@ -931,7 +931,7 @@ static int link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym, linker_symval_t* symval) { elf_file_t ef = lf->priv; - Elf_Sym* es = (Elf_Sym*) sym; + const Elf_Sym* es = (const Elf_Sym*) sym; if (es >= ef->symtab && ((es - ef->symtab) < ef->nchains)) { symval->name = ef->strtab + es->st_name; diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 91a78bf..7a87799 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_elf.c,v 1.13 1999/01/27 21:49:56 dillon Exp $ + * $Id: link_elf.c,v 1.14 1999/01/27 23:45:39 dillon Exp $ */ #include <sys/param.h> @@ -931,7 +931,7 @@ static int link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym, linker_symval_t* symval) { elf_file_t ef = lf->priv; - Elf_Sym* es = (Elf_Sym*) sym; + const Elf_Sym* es = (const Elf_Sym*) sym; if (es >= ef->symtab && ((es - ef->symtab) < ef->nchains)) { symval->name = ef->strtab + es->st_name; diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c index b469d65..fac7a59 100644 --- a/sys/kern/subr_scanf.c +++ b/sys/kern/subr_scanf.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: subr_scanf.c,v 1.1 1999/01/15 00:03:39 msmith Exp $ + * $Id: subr_scanf.c,v 1.2 1999/01/27 21:36:14 dillon Exp $ * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp */ @@ -639,7 +639,7 @@ doswitch: * alphabets and digits are each contiguous. */ u_quad_t -strtouq(const char *nptr, char **endptr, int base) +strtouq(const char *nptr, const char **endptr, int base) { const char *s = nptr; u_quad_t acc; @@ -708,7 +708,7 @@ strtouq(const char *nptr, char **endptr, int base) * alphabets and digits are each contiguous. */ quad_t -strtoq(const char *nptr, char **endptr, int base) +strtoq(const char *nptr, const char **endptr, int base) { const char *s; u_quad_t acc; diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 6deefed..66ddd50 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: sys_pipe.c,v 1.47 1999/01/27 10:10:02 bde Exp $ + * $Id: sys_pipe.c,v 1.48 1999/01/27 21:49:57 dillon Exp $ */ /* @@ -987,8 +987,8 @@ pipe_poll(fp, events, cred, p) if (events & (POLLOUT | POLLWRNORM)) if (wpipe == NULL || (wpipe->pipe_state & PIPE_EOF) || - ((wpipe->pipe_state & PIPE_DIRECTW) == 0) && - (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF) + (((wpipe->pipe_state & PIPE_DIRECTW) == 0) && + (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF)) revents |= events & (POLLOUT | POLLWRNORM); if ((rpipe->pipe_state & PIPE_EOF) || diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 08ebd85..9eb6ee9 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -13,7 +13,7 @@ * bad that happens because of using this software isn't the responsibility * of the author. This software is distributed AS-IS. * - * $Id: vfs_aio.c,v 1.37 1999/01/21 08:29:05 dillon Exp $ + * $Id: vfs_aio.c,v 1.38 1999/01/27 21:49:57 dillon Exp $ */ /* @@ -359,8 +359,9 @@ aio_free_entry(struct aiocblist *aiocbe) } if ((ki->kaio_flags & KAIO_WAKEUP) || - (ki->kaio_flags & KAIO_RUNDOWN) && - ((ki->kaio_buffer_count == 0) && (ki->kaio_queue_count == 0))) { + ((ki->kaio_flags & KAIO_RUNDOWN) && + ((ki->kaio_buffer_count == 0) && + (ki->kaio_queue_count == 0)))) { ki->kaio_flags &= ~KAIO_WAKEUP; wakeup(p); } @@ -797,8 +798,8 @@ aio_daemon(void *uproc) lj->lioj_queue_finished_count++; } if ((ki->kaio_flags & KAIO_WAKEUP) || - (ki->kaio_flags & KAIO_RUNDOWN) && - (ki->kaio_active_count == 0)) { + ((ki->kaio_flags & KAIO_RUNDOWN) && + (ki->kaio_active_count == 0))) { ki->kaio_flags &= ~KAIO_WAKEUP; wakeup(userp); } diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 44b1698..23a4e83 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.182 1999/01/10 01:58:26 eivind Exp $ + * $Id: vfs_subr.c,v 1.183 1999/01/21 08:29:05 dillon Exp $ */ /* @@ -1594,7 +1594,7 @@ vclean(vp, flags, p) * Clean out any buffers associated with the vnode. */ vinvalbuf(vp, V_SAVE, NOCRED, p, 0, 0); - if (obj = vp->v_object) { + if ((obj = vp->v_object) != NULL) { if (obj->ref_count == 0) { /* * This is a normal way of shutting down the object/vnode diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 43589c74..3b8715b 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 - * $Id: vfs_init.c,v 1.40 1998/11/15 15:18:30 bde Exp $ + * $Id: vfs_init.c,v 1.41 1998/12/07 21:58:30 archie Exp $ */ @@ -86,7 +86,7 @@ struct vm_zone *namei_zone; */ /* Table of known vnodeop vectors (list of VFS vnode vectors) */ -static struct vnodeopv_desc **vnodeopv_descs; +static const struct vnodeopv_desc **vnodeopv_descs; static int vnodeopv_num; /* Table of known descs (list of vnode op handlers "vop_access_desc") */ @@ -102,7 +102,7 @@ vfs_opv_recalc(void) vop_t ***opv_desc_vector_p; vop_t **opv_desc_vector; struct vnodeopv_entry_desc *opve_descp; - struct vnodeopv_desc *opv; + const struct vnodeopv_desc *opv; if (vfs_op_descs == NULL) panic("vfs_opv_recalc called with null vfs_op_descs"); @@ -154,18 +154,18 @@ vfs_opv_recalc(void) } void -vfs_add_vnodeops(void *data) +vfs_add_vnodeops(const void *data) { - struct vnodeopv_desc *opv; - struct vnodeopv_desc **newopv; + const struct vnodeopv_desc *opv; + const struct vnodeopv_desc **newopv; struct vnodeop_desc **newop; int *newref; vop_t **opv_desc_vector; struct vnodeop_desc *desc; int i, j; - opv = (struct vnodeopv_desc *)data; - MALLOC(newopv, struct vnodeopv_desc **, + opv = (const struct vnodeopv_desc *)data; + MALLOC(newopv, const struct vnodeopv_desc **, (vnodeopv_num + 1) * sizeof(*newopv), M_VNODE, M_WAITOK); if (newopv == NULL) panic("vfs_add_vnodeops: no memory"); @@ -221,10 +221,10 @@ vfs_add_vnodeops(void *data) } void -vfs_rm_vnodeops(void *data) +vfs_rm_vnodeops(const void *data) { - struct vnodeopv_desc *opv; - struct vnodeopv_desc **newopv; + const struct vnodeopv_desc *opv; + const struct vnodeopv_desc **newopv; struct vnodeop_desc **newop; int *newref; vop_t **opv_desc_vector; @@ -283,7 +283,7 @@ vfs_rm_vnodeops(void *data) } if (i == vnodeopv_num) panic("vfs_remove_vnodeops: opv not found"); - MALLOC(newopv, struct vnodeopv_desc **, + MALLOC(newopv, const struct vnodeopv_desc **, (vnodeopv_num - 1) * sizeof(*newopv), M_VNODE, M_WAITOK); if (newopv == NULL) panic("vfs_remove_vnodeops: no memory"); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 30b28a7..cb418ee 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94 - * $Id: vfs_lookup.c,v 1.31 1999/01/10 01:58:26 eivind Exp $ + * $Id: vfs_lookup.c,v 1.32 1999/01/27 21:49:58 dillon Exp $ */ #include "opt_ktrace.h" @@ -642,7 +642,7 @@ relookup(dvp, vpp, cnp) /* * We now have a segment name to search for, and a directory to search. */ - if (error = VOP_LOOKUP(dp, vpp, cnp)) { + if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) { KASSERT(*vpp == NULL, ("leaf should be empty")); if (error != EJUSTRETURN) goto bad; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 44b1698..23a4e83 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.182 1999/01/10 01:58:26 eivind Exp $ + * $Id: vfs_subr.c,v 1.183 1999/01/21 08:29:05 dillon Exp $ */ /* @@ -1594,7 +1594,7 @@ vclean(vp, flags, p) * Clean out any buffers associated with the vnode. */ vinvalbuf(vp, V_SAVE, NOCRED, p, 0, 0); - if (obj = vp->v_object) { + if ((obj = vp->v_object) != NULL) { if (obj->ref_count == 0) { /* * This is a normal way of shutting down the object/vnode diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index ca25440..6c9cfc0 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.67 1999/01/27 22:42:05 dillon Exp $ + * $Id: devfs_vnops.c,v 1.68 1999/01/27 23:49:45 dillon Exp $ */ @@ -1724,6 +1724,9 @@ devfs_strategy(struct vop_strategy_args *ap) case VBLK: (*dnp->by.Bdev.bdevsw->d_strategy)(bp); break; + default: + /* XXX set error code? */ + break; } return (0); } diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 514ba82..db5c341 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.30 1998/12/07 21:58:32 archie Exp $ + * $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ + * $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $ */ /* @@ -452,7 +452,7 @@ null_getattr(ap) { int error; - if (error = null_bypass((struct vop_generic_args *)ap)) + if ((error = null_bypass((struct vop_generic_args *)ap)) != 0) return (error); /* Requires that arguments be restored. */ ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0]; diff --git a/sys/netatm/atm_signal.c b/sys/netatm/atm_signal.c index da46c98..11660d5 100644 --- a/sys/netatm/atm_signal.c +++ b/sys/netatm/atm_signal.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_signal.c,v 1.1 1998/09/15 08:22:58 phk Exp $ + * @(#) $Id: atm_signal.c,v 1.2 1998/10/31 20:06:54 phk Exp $ * */ @@ -38,7 +38,7 @@ #include <netatm/kern_include.h> #ifndef lint -__RCSID("@(#) $Id: atm_signal.c,v 1.1 1998/09/15 08:22:58 phk Exp $"); +__RCSID("@(#) $Id: atm_signal.c,v 1.2 1998/10/31 20:06:54 phk Exp $"); #endif @@ -212,8 +212,8 @@ atm_sigmgr_attach(pip, proto) for (nip = pip->pif_nif; nip; nip = nip->nif_pnext) { for (ncp = atm_netconv_head; ncp; ncp = ncp->ncm_next) { - if (err = (*ncp->ncm_stat) - (NCM_SIGATTACH, nip, 0)) + if ((err = (*ncp->ncm_stat) + (NCM_SIGATTACH, nip, 0)) != 0) break; } if (err) diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c index 24dd44f..d4c9c95 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.3 1998/12/04 22:54:53 archie Exp $ + * @(#) $Id: spans_cls.c,v 1.4 1999/01/27 22:42:22 dillon Exp $ * */ @@ -44,7 +44,7 @@ #include <netatm/spans/spans_cls.h> #ifndef lint -__RCSID("@(#) $Id: spans_cls.c,v 1.3 1998/12/04 22:54:53 archie Exp $"); +__RCSID("@(#) $Id: spans_cls.c,v 1.4 1999/01/27 22:42:22 dillon Exp $"); #endif @@ -60,10 +60,10 @@ struct spans_addr spans_bcastaddr = { }; struct spanscls_hdr spanscls_hdr = { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* dst */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* src */ + { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* dst */ + { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, /* src */ 0x00, 0x00, 0, - 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0 /* LLC SNAP */ + 0xaa, 0xaa, 0x03, { 0x00, 0x00, 0x00 }, 0 /* LLC SNAP */ }; diff --git a/sys/netatm/uni/sscop.c b/sys/netatm/uni/sscop.c index bfd37bd..b4fb6e2 100644 --- a/sys/netatm/uni/sscop.c +++ b/sys/netatm/uni/sscop.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.c,v 1.2 1998/09/17 09:35:01 phk Exp $ + * @(#) $Id: sscop.c,v 1.3 1998/10/31 20:07:00 phk Exp $ * */ @@ -44,7 +44,7 @@ #include <netatm/uni/sscop_var.h> #ifndef lint -__RCSID("@(#) $Id: sscop.c,v 1.2 1998/09/17 09:35:01 phk Exp $"); +__RCSID("@(#) $Id: sscop.c,v 1.3 1998/10/31 20:07:00 phk Exp $"); #endif @@ -144,7 +144,7 @@ sscop_start() /* * Register stack service */ - if (err = atm_stack_register(&sscop_service)) + if ((err = atm_stack_register(&sscop_service)) != 0) goto done; /* diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 2796068..2cb151d 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.22 1999/01/12 12:37:18 eivind Exp $ + * $Id: spx_usrreq.c,v 1.23 1999/01/27 22:42:26 dillon Exp $ */ #include <sys/param.h> @@ -463,8 +463,8 @@ 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)) || + 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 diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index cc4775b..5f34890 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.78 1998/10/31 15:31:26 peter Exp $ + * $Id: nfs_vfsops.c,v 1.79 1998/12/04 22:54:54 archie Exp $ */ #include <sys/param.h> @@ -142,8 +142,8 @@ VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK); * server for a diskless/dataless machine. It is initialized below just * to ensure that it is allocated to initialized data (.data not .bss). */ -struct nfs_diskless nfs_diskless = { 0 }; -struct nfsv3_diskless nfsv3_diskless = { 0 }; +struct nfs_diskless nfs_diskless = { { 0 } }; +struct nfsv3_diskless nfsv3_diskless = { { 0 } }; int nfs_diskless_valid = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, @@ -490,8 +490,8 @@ nfs_mountroot(mp) (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->root_hostnam); printf("NFS ROOT: %s\n",buf); - if (error = nfs_mountdiskless(buf, "/", MNT_RDONLY, - &nd->root_saddr, &nd->root_args, p, &vp, &mp)) { + if ((error = nfs_mountdiskless(buf, "/", MNT_RDONLY, + &nd->root_saddr, &nd->root_args, p, &vp, &mp)) != 0) { if (swap_mp) { mp->mnt_vfc->vfc_refcount--; free(swap_mp, M_MOUNT); @@ -516,8 +516,8 @@ nfs_mountroot(mp) (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->swap_hostnam); printf("NFS SWAP: %s\n",buf); - if (error = nfs_mountdiskless(buf, "/swap", 0, - &nd->swap_saddr, &nd->swap_args, p, &vp, &swap_mp)) + if ((error = nfs_mountdiskless(buf, "/swap", 0, + &nd->swap_saddr, &nd->swap_args, p, &vp, &swap_mp)) != 0) return (error); vfs_unbusy(swap_mp, p); @@ -581,7 +581,7 @@ nfs_mountdiskless(path, which, mountflag, sin, args, p, vpp, mpp) mp->mnt_kern_flag = 0; mp->mnt_flag = mountflag; nam = dup_sockaddr((struct sockaddr *)sin, 1); - if (error = mountnfs(args, mp, nam, which, path, vpp)) { + if ((error = mountnfs(args, mp, nam, which, path, vpp)) != 0) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp, p); diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index cc4775b..5f34890 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.78 1998/10/31 15:31:26 peter Exp $ + * $Id: nfs_vfsops.c,v 1.79 1998/12/04 22:54:54 archie Exp $ */ #include <sys/param.h> @@ -142,8 +142,8 @@ VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK); * server for a diskless/dataless machine. It is initialized below just * to ensure that it is allocated to initialized data (.data not .bss). */ -struct nfs_diskless nfs_diskless = { 0 }; -struct nfsv3_diskless nfsv3_diskless = { 0 }; +struct nfs_diskless nfs_diskless = { { 0 } }; +struct nfsv3_diskless nfsv3_diskless = { { 0 } }; int nfs_diskless_valid = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, @@ -490,8 +490,8 @@ nfs_mountroot(mp) (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->root_hostnam); printf("NFS ROOT: %s\n",buf); - if (error = nfs_mountdiskless(buf, "/", MNT_RDONLY, - &nd->root_saddr, &nd->root_args, p, &vp, &mp)) { + if ((error = nfs_mountdiskless(buf, "/", MNT_RDONLY, + &nd->root_saddr, &nd->root_args, p, &vp, &mp)) != 0) { if (swap_mp) { mp->mnt_vfc->vfc_refcount--; free(swap_mp, M_MOUNT); @@ -516,8 +516,8 @@ nfs_mountroot(mp) (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->swap_hostnam); printf("NFS SWAP: %s\n",buf); - if (error = nfs_mountdiskless(buf, "/swap", 0, - &nd->swap_saddr, &nd->swap_args, p, &vp, &swap_mp)) + if ((error = nfs_mountdiskless(buf, "/swap", 0, + &nd->swap_saddr, &nd->swap_args, p, &vp, &swap_mp)) != 0) return (error); vfs_unbusy(swap_mp, p); @@ -581,7 +581,7 @@ nfs_mountdiskless(path, which, mountflag, sin, args, p, vpp, mpp) mp->mnt_kern_flag = 0; mp->mnt_flag = mountflag; nam = dup_sockaddr((struct sockaddr *)sin, 1); - if (error = mountnfs(args, mp, nam, which, path, vpp)) { + if ((error = mountnfs(args, mp, nam, which, path, vpp)) != 0) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp, p); diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index c9534af..ec456f6 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -1,4 +1,4 @@ -/* $Id: brooktree848.c,v 1.61 1998/12/14 06:32:54 dillon Exp $ */ +/* $Id: brooktree848.c,v 1.62 1999/01/23 11:32:06 roger Exp $ */ /* BT848 Driver for Brooktree's Bt848 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and Jim Lowe's driver for the Matrox Meteor PCI card . The @@ -3184,7 +3184,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , /* must be Blue. */ start_skip = 0; if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 )) - switch ( ((uintptr_t) (void *) *target_buffer) % 4 ) { + switch ( ((uintptr_t) (volatile void *) *target_buffer) % 4 ) { case 2 : start_skip = 4 ; break; case 1 : start_skip = 8 ; break; } @@ -3207,7 +3207,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer; + *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer; *target_buffer += width * pixel_width; bktr->current_col += width; @@ -3238,7 +3238,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width / 2 - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer ; + *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer ; *target_buffer += (width * pixel_width / 2) ; if ( operation == OP_WRITE ) diff --git a/sys/pci/if_ax.c b/sys/pci/if_ax.c index 34f1e88..098317b 100644 --- a/sys/pci/if_ax.c +++ b/sys/pci/if_ax.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_ax.c,v 1.8 1999/01/16 20:33:34 wpaul Exp $ + * $Id: if_ax.c,v 1.3 1999/01/16 20:40:52 wpaul Exp $ */ /* @@ -87,7 +87,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_ax.c,v 1.8 1999/01/16 20:33:34 wpaul Exp $"; + "$Id: if_ax.c,v 1.3 1999/01/16 20:40:52 wpaul Exp $"; #endif /* @@ -1347,7 +1347,7 @@ static int ax_list_rx_init(sc) for (i = 0; i < AX_RX_LIST_CNT; i++) { cd->ax_rx_chain[i].ax_ptr = - (struct ax_desc *)&ld->ax_rx_list[i]; + (volatile struct ax_desc *)&ld->ax_rx_list[i]; if (ax_newbuf(sc, &cd->ax_rx_chain[i]) == ENOBUFS) return(ENOBUFS); if (i == (AX_RX_LIST_CNT - 1)) { @@ -2129,7 +2129,7 @@ static void ax_stop(sc) sc->ax_cdata.ax_rx_chain[i].ax_mbuf = NULL; } } - bzero((char *)&sc->ax_ldata->ax_rx_list, + bzero((volatile char *)&sc->ax_ldata->ax_rx_list, sizeof(sc->ax_ldata->ax_rx_list)); /* @@ -2142,7 +2142,7 @@ static void ax_stop(sc) } } - bzero((char *)&sc->ax_ldata->ax_tx_list, + bzero((volatile char *)&sc->ax_ldata->ax_tx_list, sizeof(sc->ax_ldata->ax_tx_list)); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index c9c79ec..1d1de89 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -1,5 +1,5 @@ /* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */ -/* $Id: if_de.c,v 1.93 1998/12/30 00:37:43 hoek Exp $ */ +/* $Id: if_de.c,v 1.94 1999/01/27 23:45:41 dillon Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -2412,7 +2412,7 @@ tulip_srom_decode( /* * Save the hardware address. */ - bcopy((caddr_t) shp->sh_ieee802_address, (caddr_t) sc->tulip_enaddr, 6); + bcopy((v_caddr_t) shp->sh_ieee802_address, (v_caddr_t) sc->tulip_enaddr, 6); /* * If this is a multiple port card, add the adapter index to the last * byte of the hardware address. (if it isn't multiport, adding 0 diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index 350546e..83deb25 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.59 1998/12/14 05:47:27 dillon Exp $ + * $Id: if_fxp.c,v 1.60 1999/01/27 23:45:42 dillon Exp $ */ /* @@ -1347,7 +1347,7 @@ fxp_init(xsc) #if defined(__NetBSD__) bcopy(LLADDR(ifp->if_sadl), (void *)cb_ias->macaddr, 6); #else - bcopy(sc->arpcom.ac_enaddr, (void *)cb_ias->macaddr, + bcopy(sc->arpcom.ac_enaddr, (volatile void *)cb_ias->macaddr, sizeof(sc->arpcom.ac_enaddr)); #endif /* __NetBSD__ */ @@ -1820,7 +1820,7 @@ fxp_mc_setup(sc) break; } bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - (void *) &sc->mcsp->mc_addr[nmcasts][0], 6); + (volatile void *) &sc->mcsp->mc_addr[nmcasts][0], 6); nmcasts++; } } diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c index 8ea2472..2dec6b3 100644 --- a/sys/pci/if_mx.c +++ b/sys/pci/if_mx.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_mx.c,v 1.8 1999/01/06 17:30:06 wpaul Exp $ + * $Id: if_mx.c,v 1.9 1999/01/27 23:45:42 dillon Exp $ */ /* @@ -94,7 +94,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_mx.c,v 1.8 1999/01/06 17:30:06 wpaul Exp $"; + "$Id: if_mx.c,v 1.9 1999/01/27 23:45:42 dillon Exp $"; #endif /* @@ -2390,7 +2390,7 @@ static void mx_stop(sc) sc->mx_cdata.mx_rx_chain[i].mx_mbuf = NULL; } } - bzero((char *)&sc->mx_ldata->mx_rx_list, + bzero((volatile char *)&sc->mx_ldata->mx_rx_list, sizeof(sc->mx_ldata->mx_rx_list)); /* @@ -2403,7 +2403,7 @@ static void mx_stop(sc) } } - bzero((char *)&sc->mx_ldata->mx_tx_list, + bzero((volatile char *)&sc->mx_ldata->mx_tx_list, sizeof(sc->mx_ldata->mx_tx_list)); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 3be56ae..705e8c6 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: intpm.c,v 1.2 1999/01/27 18:36:49 dillon Exp $ + * $Id: intpm.c,v 1.3 1999/01/27 23:45:43 dillon Exp $ */ #include "pci.h" @@ -308,7 +308,7 @@ static void intsmb_alrintr(device_t dev) volatile u_int8_t *addr; addr=bus_space_read_1(sc->st,sc->sh, PIIX4_SMBHSTDAT0); - printf("ALART_RESPONSE: %p\n",(int) addr); + printf("ALART_RESPONSE: %p\n", addr); } }else{ printf("ERROR\n"); diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index ee19a44..d23965f 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcisupport.c,v 1.88 1999/01/26 04:54:38 peter Exp $ +** $Id: pcisupport.c,v 1.89 1999/01/27 20:09:21 dillon Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -383,7 +383,7 @@ chipset_probe (pcici_t tag, pcidi_t type) return ("NEC 003B PCI to PC-98 C-bus bridge"); }; - if (descr = generic_pci_bridge(tag)) + if ((descr = generic_pci_bridge(tag)) != NULL) return descr; return NULL; diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index ec58bd0..a064645 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 - * $Id: kernel.h,v 1.48 1998/12/20 16:54:27 bde Exp $ + * $Id: kernel.h,v 1.49 1999/01/14 05:48:46 jdp Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -181,7 +181,7 @@ typedef enum sysinit_elem_type { struct sysinit { unsigned int subsystem; /* subsystem identifier*/ unsigned int order; /* init order within subsystem*/ - void (*func) __P((void *)); /* init function*/ + void (*func) __P((const void *)); /* init function*/ void *udata; /* multiplexer/argument */ si_elem_t type; /* sysinit_elem_type*/ }; diff --git a/sys/sys/systm.h b/sys/sys/systm.h index c0cc60c..6e91ac9 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)systm.h 8.7 (Berkeley) 3/29/95 - * $Id: systm.h,v 1.83 1999/01/15 00:03:39 msmith Exp $ + * $Id: systm.h,v 1.84 1999/01/15 17:25:02 msmith Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -122,8 +122,8 @@ int vsprintf __P((char *buf, const char *, _BSD_VA_LIST_)) __printflike(2, 0 void ttyprintf __P((struct tty *, const char *, ...)) __printflike(2, 3); int sscanf __P((const char *, char const *, ...)); int vsscanf __P((const char *, char const *, _BSD_VA_LIST_)); -u_quad_t strtouq __P((const char *, char **, int)); -quad_t strtoq __P((const char *, char **, int base)); +u_quad_t strtouq __P((const char *, const char **, int)); +quad_t strtoq __P((const char *, const char **, int base)); void bcopy __P((const void *from, void *to, size_t len)); void ovbcopy __P((const void *from, void *to, size_t len)); diff --git a/sys/sys/types.h b/sys/sys/types.h index 390189d..ca9a3b5 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)types.h 8.6 (Berkeley) 2/19/95 - * $Id: types.h,v 1.27 1999/01/21 08:29:08 dillon Exp $ + * $Id: types.h,v 1.28 1999/01/27 19:01:44 dillon Exp $ */ #ifndef _SYS_TYPES_H_ @@ -67,7 +67,8 @@ typedef int64_t quad_t; typedef quad_t * qaddr_t; typedef char * caddr_t; /* core address */ -typedef const char * c_caddr_t; /* core address */ +typedef const char * c_caddr_t; /* core address, pointer to const */ +typedef volatile char * v_caddr_t; /* core address, pointer to volatile */ typedef int32_t daddr_t; /* disk address */ typedef u_int32_t u_daddr_t; /* unsigned disk address */ typedef u_int32_t dev_t; /* device number */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 9604690..427da53 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 - * $Id: vnode.h,v 1.80 1999/01/20 14:49:12 eivind Exp $ + * $Id: vnode.h,v 1.81 1999/01/27 21:50:00 dillon Exp $ */ #ifndef _SYS_VNODE_H_ @@ -492,8 +492,8 @@ void vattr_null __P((struct vattr *vap)); int vcount __P((struct vnode *vp)); void vdrop __P((struct vnode *)); int vfinddev __P((dev_t dev, enum vtype type, struct vnode **vpp)); -void vfs_add_vnodeops __P((void *)); -void vfs_rm_vnodeops __P((void *)); +void vfs_add_vnodeops __P((const void *)); +void vfs_rm_vnodeops __P((const void *)); int vflush __P((struct mount *mp, struct vnode *skipvp, int flags)); int vget __P((struct vnode *vp, int lockflag, struct proc *p)); void vgone __P((struct vnode *vp)); diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 6153766..2410b92 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_balloc.c 8.8 (Berkeley) 6/16/95 - * $Id: ffs_balloc.c,v 1.20 1998/03/08 09:58:47 julian Exp $ + * $Id: ffs_balloc.c,v 1.21 1998/09/12 14:46:15 bde Exp $ */ #include <sys/param.h> @@ -184,7 +184,7 @@ ffs_balloc(ap) * Determine the number of levels of indirection. */ pref = 0; - if (error = ufs_getlbns(vp, lbn, indirs, &num)) + if ((error = ufs_getlbns(vp, lbn, indirs, &num)) != 0) return(error); #ifdef DIAGNOSTIC if (num < 1) @@ -199,8 +199,8 @@ ffs_balloc(ap) allocblk = allociblk; if (nb == 0) { pref = ffs_blkpref(ip, lbn, 0, (ufs_daddr_t *)0); - if (error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) + if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, + cred, &newb)) != 0) return (error); nb = newb; *allocblk++ = nb; @@ -216,7 +216,7 @@ ffs_balloc(ap) * Write synchronously so that indirect blocks * never point at garbage. */ - if (error = bwrite(bp)) + if ((error = bwrite(bp)) != 0) goto fail; } allocib = &ip->i_ib[indirs[0].in_off]; @@ -244,8 +244,8 @@ ffs_balloc(ap) } if (pref == 0) pref = ffs_blkpref(ip, lbn, 0, (ufs_daddr_t *)0); - if (error = - ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb)) { + if ((error = + ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb)) != 0) { brelse(bp); goto fail; } @@ -263,7 +263,7 @@ ffs_balloc(ap) * Write synchronously so that indirect blocks * never point at garbage. */ - if (error = bwrite(nbp)) { + if ((error = bwrite(nbp)) != 0) { brelse(bp); goto fail; } diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index b474bc5..8821440 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 - * $Id: ffs_inode.c,v 1.51 1999/01/06 18:18:06 bde Exp $ + * $Id: ffs_inode.c,v 1.52 1999/01/07 16:14:16 bde Exp $ */ #include "opt_quota.h" @@ -490,8 +490,8 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) if (nb == 0) continue; if (level > SINGLE) { - if (error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb), - (ufs_daddr_t)-1, level - 1, &blkcount)) + if ((error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb), + (ufs_daddr_t)-1, level - 1, &blkcount)) != 0) allerror = error; blocksreleased += blkcount; } diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 2973703..cffe980 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.94 1999/01/05 18:50:03 eivind Exp $ + * $Id: ffs_vfsops.c,v 1.95 1999/01/07 16:14:17 bde Exp $ */ #include "opt_quota.h" @@ -221,8 +221,8 @@ ffs_mount( mp, path, data, ndp, p) */ if (p->p_ucred->cr_uid != 0) { vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); - if (error = VOP_ACCESS(devvp, VREAD | VWRITE, - p->p_ucred, p)) { + if ((error = VOP_ACCESS(devvp, VREAD | VWRITE, + p->p_ucred, p)) != 0) { VOP_UNLOCK(devvp, 0, p); return (error); } @@ -305,7 +305,7 @@ ffs_mount( mp, path, data, ndp, p) if ((mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); - if (error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) { + if ((error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p)) != 0) { vput(devvp); return (error); } @@ -472,7 +472,7 @@ ffs_reload(mp, cred, p) size = DEV_BSIZE; else size = dpart.disklab->d_secsize; - if (error = bread(devvp, (ufs_daddr_t)(SBOFF/size), SBSIZE, NOCRED,&bp)) + if ((error = bread(devvp, (ufs_daddr_t)(SBOFF/size), SBSIZE, NOCRED,&bp)) != 0) return (error); newfs = (struct fs *)bp->b_data; if (newfs->fs_magic != FS_MAGIC || newfs->fs_bsize > MAXBSIZE || @@ -634,7 +634,7 @@ ffs_mountfs(devvp, mp, p, malloctype) bp = NULL; ump = NULL; - if (error = bread(devvp, SBLOCK, SBSIZE, cred, &bp)) + if ((error = bread(devvp, SBLOCK, SBSIZE, cred, &bp)) != 0) goto out; fs = (struct fs *)bp->b_data; if (fs->fs_magic != FS_MAGIC || fs->fs_bsize > MAXBSIZE || @@ -693,8 +693,8 @@ ffs_mountfs(devvp, mp, p, malloctype) size = fs->fs_bsize; if (i + fs->fs_frag > blks) size = (blks - i) * fs->fs_fsize; - if (error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, - cred, &bp)) { + if ((error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, + cred, &bp)) != 0) { free(base, M_UFSMNT); goto out; } @@ -973,9 +973,9 @@ loop: simple_lock(&vp->v_interlock); nvp = vp->v_mntvnodes.le_next; ip = VTOI(vp); - if ((vp->v_type == VNON) || ((ip->i_flag & + if ((vp->v_type == VNON) || (((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0) && - (TAILQ_EMPTY(&vp->v_dirtyblkhd) || (waitfor == MNT_LAZY))) { + (TAILQ_EMPTY(&vp->v_dirtyblkhd) || (waitfor == MNT_LAZY)))) { simple_unlock(&vp->v_interlock); continue; } @@ -989,7 +989,7 @@ loop: goto loop; continue; } - if (error = VOP_FSYNC(vp, cred, waitfor, p)) + if ((error = VOP_FSYNC(vp, cred, waitfor, p)) != 0) allerror = error; VOP_UNLOCK(vp, 0, p); vrele(vp); @@ -1264,7 +1264,7 @@ ffs_sbupdate(mp, waitfor) space += size; if (waitfor != MNT_WAIT) bawrite(bp); - else if (error = bwrite(bp)) + else if ((error = bwrite(bp)) != 0) allerror = error; } /* @@ -1294,7 +1294,7 @@ ffs_sbupdate(mp, waitfor) dfs->fs_maxfilesize = mp->um_savedmaxfilesize; /* XXX */ if (waitfor != MNT_WAIT) bawrite(bp); - else if (error = bwrite(bp)) + else if ((error = bwrite(bp)) != 0) allerror = error; return (allerror); } diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index 6333cca..2bbacd9 100644 --- a/sys/ufs/mfs/mfs_vfsops.c +++ b/sys/ufs/mfs/mfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95 - * $Id: mfs_vfsops.c,v 1.54 1999/01/21 08:29:08 dillon Exp $ + * $Id: mfs_vfsops.c,v 1.55 1999/01/21 09:24:46 dillon Exp $ */ @@ -260,7 +260,7 @@ mfs_mount(mp, path, data, ndp, p) */ /* copy in user arguments*/ - if (err = copyin(data, (caddr_t)&args, sizeof (struct mfs_args))) + if ((err = copyin(data, (caddr_t)&args, sizeof (struct mfs_args))) != 0) goto error_1; /* @@ -343,7 +343,7 @@ mfs_mount(mp, path, data, ndp, p) &size); /* real size*/ bzero( mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - if (err = ffs_mountfs(devvp, mp, p, M_MFSNODE)) { + if ((err = ffs_mountfs(devvp, mp, p, M_MFSNODE)) != 0) { mfsp->mfs_active = 0; goto error_2; } @@ -409,7 +409,7 @@ mfs_start(mp, flags, p) s = splbio(); - while (bp = bufq_first(&mfsp->buf_queue)) { + while ((bp = bufq_first(&mfsp->buf_queue)) != NULL) { bufq_remove(&mfsp->buf_queue, bp); splx(s); mfs_doio(bp, mfsp); diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c index 4b5ff20..15fad13 100644 --- a/sys/ufs/mfs/mfs_vnops.c +++ b/sys/ufs/mfs/mfs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mfs_vnops.c 8.11 (Berkeley) 5/22/95 - * $Id: mfs_vnops.c,v 1.40 1999/01/21 09:27:03 dillon Exp $ + * $Id: mfs_vnops.c,v 1.41 1999/01/27 18:19:52 dillon Exp $ */ #include <sys/param.h> @@ -320,7 +320,7 @@ mfs_close(ap) /* * Finish any pending I/O requests. */ - while (bp = bufq_first(&mfsp->buf_queue)) { + while ((bp = bufq_first(&mfsp->buf_queue)) != NULL) { bufq_remove(&mfsp->buf_queue, bp); mfs_doio(bp, mfsp); wakeup((caddr_t)bp); @@ -330,7 +330,7 @@ mfs_close(ap) * we must invalidate any in core blocks, so that * we can, free up its vnode. */ - if (error = vinvalbuf(vp, 1, ap->a_cred, ap->a_p, 0, 0)) + if ((error = vinvalbuf(vp, 1, ap->a_cred, ap->a_p, 0, 0)) != 0) return (error); /* * There should be no way to have any more uses of this diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 8d23b7e..f40ff33 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 - * $Id: ufs_bmap.c,v 1.23 1998/10/26 08:53:13 bde Exp $ + * $Id: ufs_bmap.c,v 1.24 1998/10/27 11:47:08 bde Exp $ */ #include <sys/param.h> @@ -121,7 +121,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) mp = vp->v_mount; ump = VFSTOUFS(mp); #ifdef DIAGNOSTIC - if (ap != NULL && nump == NULL || ap == NULL && nump != NULL) + if ((ap != NULL && nump == NULL) || (ap == NULL && nump != NULL)) panic("ufs_bmaparray: invalid arguments"); #endif diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index bd5e96f..44d33a8 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95 - * $Id: ufs_lookup.c,v 1.25 1998/07/11 07:46:07 bde Exp $ + * $Id: ufs_lookup.c,v 1.26 1999/01/07 16:14:18 bde Exp $ */ #include <sys/param.h> @@ -481,7 +481,7 @@ found: * regular file, or empty directory. */ if (nameiop == RENAME && wantparent && (flags & ISLASTCN)) { - if (error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) + if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_proc)) != 0) return (error); /* * Careful about locking second inode. @@ -521,7 +521,7 @@ found: pdp = vdp; if (flags & ISDOTDOT) { VOP_UNLOCK(pdp, 0, p); /* race to get the inode */ - if (error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) { + if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0) { vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p); return (error); } @@ -861,8 +861,8 @@ ufs_dirremove(dvp, ip, flags, isrmdir) /* * Whiteout entry: set d_ino to WINO. */ - if (error = - UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) + if ((error = + UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0) return (error); ep->d_ino = WINO; ep->d_type = DT_WHT; diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index fd3555a..368608b 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95 - * $Id: ufs_readwrite.c,v 1.55 1999/01/07 16:14:19 bde Exp $ + * $Id: ufs_readwrite.c,v 1.56 1999/01/21 08:29:09 dillon Exp $ */ #define BLKSIZE(a, b, c) blksize(a, b, c) @@ -564,8 +564,8 @@ ffs_getpages(ap) if (firstindex == 0) vp->v_lastr = 0; - if ((obj->behavior != OBJ_RANDOM) && - ((firstindex != 0) && (firstindex <= vp->v_lastr) && + if (((obj->behavior != OBJ_RANDOM) && + (firstindex != 0) && (firstindex <= vp->v_lastr) && ((firstindex + pcount) > vp->v_lastr)) || (obj->behavior == OBJ_SEQUENTIAL)) { struct uio auio; diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index 1ee2d38..bc683ad 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vfsops.c 8.8 (Berkeley) 5/20/95 - * $Id: ufs_vfsops.c,v 1.11 1997/10/12 20:26:27 phk Exp $ + * $Id: ufs_vfsops.c,v 1.12 1998/11/10 09:16:28 peter Exp $ */ #include "opt_quota.h" @@ -115,7 +115,7 @@ ufs_quotactl(mp, cmds, uid, arg, p) break; /* fall through */ default: - if (error = suser(p->p_ucred, &p->p_acflag)) + if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return (error); } diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 49e1a29..da20713 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 - * $Id: ufs_vnops.c,v 1.104 1999/01/07 16:14:19 bde Exp $ + * $Id: ufs_vnops.c,v 1.105 1999/01/21 08:29:09 dillon Exp $ */ #include "opt_quota.h" @@ -310,7 +310,7 @@ ufs_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); #ifdef QUOTA - if (error = getinoquota(ip)) + if ((error = getinoquota(ip)) != 0) return (error); #endif break; @@ -469,7 +469,7 @@ ufs_setattr(ap) if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) { if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); - if (error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p)) + if ((error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p)) != 0) return (error); } if (vap->va_size != VNOVAL) { @@ -489,7 +489,7 @@ ufs_setattr(ap) default: break; } - if (error = UFS_TRUNCATE(vp, vap->va_size, 0, cred, p)) + if ((error = UFS_TRUNCATE(vp, vap->va_size, 0, cred, p)) != 0) return (error); } ip = VTOI(vp); @@ -592,7 +592,7 @@ ufs_chown(vp, uid, gid, cred, p) ogid = ip->i_gid; ouid = ip->i_uid; #ifdef QUOTA - if (error = getinoquota(ip)) + if ((error = getinoquota(ip)) != 0) return (error); if (ouid == uid) { dqrele(vp, ip->i_dquot[USRQUOTA]); @@ -967,7 +967,7 @@ abortit: vput(fvp); return (error); } - if (error = vn_lock(fvp, LK_EXCLUSIVE, p)) + if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0) goto abortit; dp = VTOI(fdvp); ip = VTOI(fvp); @@ -1015,7 +1015,7 @@ abortit: ip->i_flag |= IN_CHANGE; if (DOINGSOFTDEP(fvp)) softdep_increase_linkcnt(ip); - if (error = UFS_UPDATE(fvp, !DOINGSOFTDEP(fvp))) { + if ((error = UFS_UPDATE(fvp, !DOINGSOFTDEP(fvp))) != 0) { VOP_UNLOCK(fvp, 0, p); goto bad; } @@ -1817,7 +1817,7 @@ ufsspec_read(ap) * be accessed blindly here or in the other wrapper functions. */ ip = VTOI(ap->a_vp); - if (ip != NULL && (uio->uio_resid != resid || error == 0 && resid != 0)) + if (ip != NULL && (uio->uio_resid != resid || (error == 0 && resid != 0))) ip->i_flag |= IN_ACCESS; return (error); } @@ -1842,7 +1842,7 @@ ufsspec_write(ap) resid = uio->uio_resid; error = VOCALL(spec_vnodeop_p, VOFFSET(vop_write), ap); ip = VTOI(ap->a_vp); - if (ip != NULL && (uio->uio_resid != resid || error == 0 && resid != 0)) + if (ip != NULL && (uio->uio_resid != resid || (error == 0 && resid != 0))) VTOI(ap->a_vp)->i_flag |= IN_CHANGE | IN_UPDATE; return (error); } @@ -1891,7 +1891,7 @@ ufsfifo_read(ap) error = VOCALL(fifo_vnodeop_p, VOFFSET(vop_read), ap); ip = VTOI(ap->a_vp); if ((ap->a_vp->v_mount->mnt_flag & MNT_NOATIME) == 0 && ip != NULL && - (uio->uio_resid != resid || error == 0 && resid != 0)) + (uio->uio_resid != resid || (error == 0 && resid != 0))) VTOI(ap->a_vp)->i_flag |= IN_ACCESS; return (error); } @@ -1916,7 +1916,7 @@ ufsfifo_write(ap) resid = uio->uio_resid; error = VOCALL(fifo_vnodeop_p, VOFFSET(vop_write), ap); ip = VTOI(ap->a_vp); - if (ip != NULL && (uio->uio_resid != resid || error == 0 && resid != 0)) + if (ip != NULL && (uio->uio_resid != resid || (error == 0 && resid != 0))) VTOI(ap->a_vp)->i_flag |= IN_CHANGE | IN_UPDATE; return (error); } diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index b1c4d82..7e5bc83 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.142 1999/01/24 06:04:52 dillon Exp $ + * $Id: vm_map.c,v 1.143 1999/01/26 02:49:52 julian Exp $ */ /* @@ -2279,7 +2279,7 @@ vm_map_copy_entry(src_map, dst_map, src_entry, dst_entry) /* * Make a copy of the object. */ - if (src_object = src_entry->object.vm_object) { + if ((src_object = src_entry->object.vm_object) != NULL) { if ((src_object->handle == NULL) && (src_object->type == OBJT_DEFAULT || @@ -2993,7 +2993,7 @@ vm_freeze_copyopts(object, froma, toa) if (object->shadow_count > object->ref_count) panic("vm_freeze_copyopts: sc > rc"); - while( robject = TAILQ_FIRST(&object->shadow_head)) { + while((robject = TAILQ_FIRST(&object->shadow_head)) != NULL) { vm_pindex_t bo_pindex; vm_page_t m_in, m_out; @@ -3098,7 +3098,7 @@ DB_SHOW_COMMAND(map, vm_map_print) db_iprintf(" prot=%x/%x/%s", entry->protection, entry->max_protection, - inheritance_name[entry->inheritance]); + inheritance_name[(int)(unsigned char)entry->inheritance]); if (entry->wired_count != 0) db_printf(", wired"); } diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 37a0b9e..9f5b999 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.140 1999/01/21 09:46:55 dillon Exp $ + * $Id: vm_object.c,v 1.141 1999/01/24 01:01:38 dillon Exp $ */ /* @@ -580,7 +580,7 @@ rescan: maxf = 0; for(i=1;i<vm_pageout_page_count;i++) { - if (tp = vm_page_lookup(object, pi + i)) { + if ((tp = vm_page_lookup(object, pi + i)) != NULL) { if ((tp->flags & PG_BUSY) || (tp->flags & PG_CLEANCHK) == 0 || (tp->busy != 0)) @@ -605,7 +605,7 @@ rescan: chkb = vm_pageout_page_count - maxf; if (chkb) { for(i = 1; i < chkb;i++) { - if (tp = vm_page_lookup(object, pi - i)) { + if ((tp = vm_page_lookup(object, pi - i)) != NULL) { if ((tp->flags & PG_BUSY) || (tp->flags & PG_CLEANCHK) == 0 || (tp->busy != 0)) @@ -1302,7 +1302,7 @@ vm_object_collapse(object) backing_object->generation++; new_backing_object = backing_object->backing_object; - if (object->backing_object = new_backing_object) { + if ((object->backing_object = new_backing_object) != NULL) { vm_object_reference(new_backing_object); TAILQ_INSERT_TAIL(&new_backing_object->shadow_head, object, shadow_list); @@ -1550,7 +1550,7 @@ _vm_object_in_map(map, object, entry) } tmpe = tmpe->next; } - } else if (obj = entry->object.vm_object) { + } else if ((obj = entry->object.vm_object) != NULL) { for(; obj; obj=obj->backing_object) if( obj == object) { return 1; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index d9bf885..346500a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.121 1999/01/24 06:00:31 dillon Exp $ + * $Id: vm_page.c,v 1.122 1999/01/24 07:06:52 dillon Exp $ */ /* @@ -101,15 +101,15 @@ static int vm_page_bucket_count; /* How big is array? */ static int vm_page_hash_mask; /* Mask for hash function */ static volatile int vm_page_bucket_generation; -struct pglist vm_page_queue_free[PQ_L2_SIZE] = {0}; -struct pglist vm_page_queue_zero[PQ_L2_SIZE] = {0}; +struct pglist vm_page_queue_free[PQ_L2_SIZE] = {{0}}; +struct pglist vm_page_queue_zero[PQ_L2_SIZE] = {{0}}; struct pglist vm_page_queue_active = {0}; struct pglist vm_page_queue_inactive = {0}; -struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {0}; +struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {{0}}; static int no_queue=0; -struct vpgqueues vm_page_queues[PQ_COUNT] = {0}; +struct vpgqueues vm_page_queues[PQ_COUNT] = {{0}}; static int pqcnt[PQ_COUNT] = {0}; static void @@ -711,13 +711,13 @@ vm_page_list_find(basequeue, index) hindex = index + ij; if (hindex >= PQ_L2_SIZE) hindex -= PQ_L2_SIZE; - if (m = TAILQ_FIRST(pq[hindex].pl)) + if ((m = TAILQ_FIRST(pq[hindex].pl)) != NULL) return m; hindex = index - ij; if (hindex < 0) hindex += PQ_L2_SIZE; - if (m = TAILQ_FIRST(pq[hindex].pl)) + if ((m = TAILQ_FIRST(pq[hindex].pl)) != NULL) return m; } } @@ -854,9 +854,9 @@ vm_page_select_free(object, pindex, prefqueue) index = (pindex + object->pg_color) & PQ_L2_MASK; - if (m = TAILQ_FIRST(pq[index].pl)) + if ((m = TAILQ_FIRST(pq[index].pl)) != NULL) return m; - if (m = TAILQ_FIRST(pq[index + oqueuediff].pl)) + if ((m = TAILQ_FIRST(pq[index + oqueuediff].pl)) != NULL) return m; for(j = 0; j < PQ_L1_SIZE; j++) { @@ -868,17 +868,17 @@ vm_page_select_free(object, pindex, prefqueue) hindex = index + ij; if (hindex >= PQ_L2_SIZE) hindex -= PQ_L2_SIZE; - if (m = TAILQ_FIRST(pq[hindex].pl)) + if ((m = TAILQ_FIRST(pq[hindex].pl)) != NULL) return m; - if (m = TAILQ_FIRST(pq[hindex + oqueuediff].pl)) + if ((m = TAILQ_FIRST(pq[hindex + oqueuediff].pl)) != NULL) return m; hindex = index - ij; if (hindex < 0) hindex += PQ_L2_SIZE; - if (m = TAILQ_FIRST(pq[hindex].pl)) + if ((m = TAILQ_FIRST(pq[hindex].pl)) != NULL) return m; - if (m = TAILQ_FIRST(pq[hindex + oqueuediff].pl)) + if ((m = TAILQ_FIRST(pq[hindex + oqueuediff].pl)) != NULL) return m; } } @@ -886,13 +886,13 @@ vm_page_select_free(object, pindex, prefqueue) hindex = index + PQ_L2_SIZE / 2; if (hindex >= PQ_L2_SIZE) hindex -= PQ_L2_SIZE; - if (m = TAILQ_FIRST(pq[hindex].pl)) + if ((m = TAILQ_FIRST(pq[hindex].pl)) != NULL) return m; - if (m = TAILQ_FIRST(pq[hindex+oqueuediff].pl)) + if ((m = TAILQ_FIRST(pq[hindex+oqueuediff].pl)) != NULL) return m; #else - if (m = TAILQ_FIRST(pq[0].pl)) + if ((m = TAILQ_FIRST(pq[0].pl)) != NULL) return m; else return TAILQ_FIRST(pq[oqueuediff].pl); |