From d4ca1c7d1e7204ea689eb37c8aca2758659c7bf4 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 25 Oct 2003 08:39:05 +0000 Subject: [PATCH] fix uninitialized variable --- sys/fs/smbfs/smbfs_io.c | 6 +++--- sys/fs/smbfs/smbfs_vnops.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 24b2d71d9a65..d41bbd927c36 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_io.c,v 1.15 2003/06/29 22:31:12 fvdl Exp $ */ +/* $NetBSD: smbfs_io.c,v 1.16 2003/10/25 08:39:05 christos Exp $ */ /* * Copyright (c) 2000-2001, Boris Popov @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smbfs_io.c,v 1.15 2003/06/29 22:31:12 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbfs_io.c,v 1.16 2003/10/25 08:39:05 christos Exp $"); #include #include @@ -90,7 +90,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) struct smb_cred scred; struct smbfs_fctx *ctx; struct smbnode *np = VTOSMB(vp); - int error/*, *eofflag = ap->a_eofflag*/; + int error = 0/*, *eofflag = ap->a_eofflag*/; long offset, limit; KASSERT(vp->v_type == VDIR); diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index ea47d2fda2ac..ed9b9b035904 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_vnops.c,v 1.28 2003/06/29 22:31:13 fvdl Exp $ */ +/* $NetBSD: smbfs_vnops.c,v 1.29 2003/10/25 08:42:08 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.28 2003/06/29 22:31:13 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.29 2003/10/25 08:42:08 christos Exp $"); #include #include @@ -289,7 +289,7 @@ smbfs_closel(struct vop_close_args *ap) struct smbnode *np = VTOSMB(vp); struct proc *p = ap->a_p; struct smb_cred scred; - int error; + int error = 0; SMBVDEBUG("name=%.*s, pid=%d, c=%d\n", (int)np->n_nmlen, np->n_name, p->p_pid, np->n_opencount); @@ -587,7 +587,7 @@ smbfs_create(v) struct smb_cred scred; const char *name = cnp->cn_nameptr; int nmlen = cnp->cn_namelen; - int error; + int error = EINVAL; if (vap->va_type != VREG)