diff options
-rw-r--r-- | sys/dev/ic/cac.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/gdt_common.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/pgt.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/twe.c | 6 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_serv.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 4 |
8 files changed, 23 insertions, 14 deletions
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index 2b459ac66f4..df4fd693049 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.35 2010/03/23 01:57:19 krw Exp $ */ +/* $OpenBSD: cac.c,v 1.36 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -893,7 +893,7 @@ int cac_create_sensors(struct cac_softc *sc) { struct device *dev; - struct scsibus_softc *ssc; + struct scsibus_softc *ssc = NULL; int i; TAILQ_FOREACH(dev, &alldevs, dv_list) { @@ -904,6 +904,7 @@ cac_create_sensors(struct cac_softc *sc) ssc = (struct scsibus_softc *)dev; if (ssc->adapter_link == &sc->sc_link) break; + ssc = NULL; } if (ssc == NULL) diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 8f2853d3f7b..e5f93a7c461 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.48 2010/03/23 01:57:19 krw Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.49 2010/03/29 23:33:39 krw Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -671,7 +671,9 @@ gdt_scsi_cmd(struct scsi_xfer *xs) */ sc->sc_cmd_off = 0; - if (xs->cmd->opcode != SYNCHRONIZE_CACHE) { + if (xs->cmd->opcode == SYNCHRONIZE_CACHE) { + blockno = blockcnt = 0; + } else { /* A read or write operation. */ if (xs->cmdlen == 6) { rw = (struct scsi_rw *)xs->cmd; diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index 25d69a638f7..afc75aaf266 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.56 2009/12/30 01:24:54 chl Exp $ */ +/* $OpenBSD: pgt.c,v 1.57 2010/03/29 23:33:39 krw Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -3199,6 +3199,8 @@ pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq) case PGT_QUEUE_MGMT_TX: qsize = PGT_QUEUE_MGMT_SIZE; break; + default: + return (EINVAL); } for (i = 0; i < qsize; i++) { diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index dd0d0c6d21d..e65f60fd715 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.34 2010/03/23 01:57:20 krw Exp $ */ +/* $OpenBSD: twe.c,v 1.35 2010/03/29 23:33:39 krw Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -864,7 +864,9 @@ twe_scsi_cmd(xs) lock = TWE_LOCK(sc); flags = 0; - if (xs->cmd->opcode != SYNCHRONIZE_CACHE) { + if (xs->cmd->opcode == SYNCHRONIZE_CACHE) { + blockno = blockcnt = 0; + } else { /* A read or write operation. */ if (xs->cmdlen == 6) { rw = (struct scsi_rw *)xs->cmd; diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index ed278b090b7..1166a2d9785 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.37 2009/08/13 22:34:29 jasper Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.38 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -367,7 +367,7 @@ detrunc(struct denode *dep, uint32_t length, int flags, struct ucred *cred, int allerror; int vflags; uint32_t eofentry; - uint32_t chaintofree; + uint32_t chaintofree = 0; daddr64_t bn; int boff; int isadir = dep->de_Attributes & ATTR_DIRECTORY; diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index f5773a15fc7..059b1a1852d 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.89 2009/10/19 22:24:18 jsg Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.90 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -439,6 +439,8 @@ nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, info.nmi_dpos = nfsd->nd_dpos; info.nmi_v3 = (nfsd->nd_flag & ND_NFSV3); + memset(&uio, 0, sizeof(uio)); + fhp = &nfh.fh_generic; nfsm_srvmtofh(fhp); error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam, &rdonly); diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 0b9fada31f5..5f0fbf3d0b6 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.127 2009/12/15 15:53:48 beck Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.128 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -1927,7 +1927,7 @@ nfs_readdir(void *v) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - int tresid, error; + int tresid, error = 0; struct vattr vattr; u_long *cookies = NULL; int ncookies = 0, cnt; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 4086cd658f7..779d79c35aa 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.101 2009/09/03 07:47:47 jasper Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.102 2010/03/29 23:33:39 krw Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -5417,7 +5417,7 @@ clear_inodedeps(p) struct proc *p; { struct inodedep_hashhead *inodedephd; - struct inodedep *inodedep; + struct inodedep *inodedep = NULL; static int next = 0; struct mount *mp; struct vnode *vp; |