Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs Ensure that error is initialized in all code paths.
details: https://anonhg.NetBSD.org/src/rev/d904cd4a2673
branches: trunk
changeset: 779722:d904cd4a2673
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Jun 13 22:56:50 2012 +0000
description:
Ensure that error is initialized in all code paths.
diffstat:
sys/fs/hfs/hfs_vfsops.c | 6 +++---
sys/fs/sysvbfs/sysvbfs_vfsops.c | 6 +++---
sys/fs/v7fs/v7fs_vfsops.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 8af99f93100c -r d904cd4a2673 sys/fs/hfs/hfs_vfsops.c
--- a/sys/fs/hfs/hfs_vfsops.c Wed Jun 13 21:17:29 2012 +0000
+++ b/sys/fs/hfs/hfs_vfsops.c Wed Jun 13 22:56:50 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hfs_vfsops.c,v 1.28 2012/03/13 18:40:37 elad Exp $ */
+/* $NetBSD: hfs_vfsops.c,v 1.29 2012/06/13 22:56:50 joerg Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.28 2012/03/13 18:40:37 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.29 2012/06/13 22:56:50 joerg Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -201,7 +201,7 @@
struct hfs_args *args = data;
struct vnode *devvp;
struct hfsmount *hmp;
- int error;
+ int error = 0;
int update;
mode_t accessmode;
diff -r 8af99f93100c -r d904cd4a2673 sys/fs/sysvbfs/sysvbfs_vfsops.c
--- a/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Jun 13 21:17:29 2012 +0000
+++ b/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Jun 13 22:56:50 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs_vfsops.c,v 1.39 2012/03/13 18:40:50 elad Exp $ */
+/* $NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.39 2012/03/13 18:40:50 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.40 2012/06/13 22:56:50 joerg Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -72,7 +72,7 @@
struct sysvbfs_args *args = data;
struct sysvbfs_mount *bmp = NULL;
struct vnode *devvp = NULL;
- int error;
+ int error = 0;
bool update;
DPRINTF("%s: mnt_flag=%x\n", __func__, mp->mnt_flag);
diff -r 8af99f93100c -r d904cd4a2673 sys/fs/v7fs/v7fs_vfsops.c
--- a/sys/fs/v7fs/v7fs_vfsops.c Wed Jun 13 21:17:29 2012 +0000
+++ b/sys/fs/v7fs/v7fs_vfsops.c Wed Jun 13 22:56:50 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: v7fs_vfsops.c,v 1.6 2012/03/13 18:40:51 elad Exp $ */
+/* $NetBSD: v7fs_vfsops.c,v 1.7 2012/06/13 22:56:51 joerg Exp $ */
/*-
* Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.6 2012/03/13 18:40:51 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.7 2012/06/13 22:56:51 joerg Exp $");
#if defined _KERNEL_OPT
#include "opt_v7fs.h"
#endif
@@ -85,7 +85,7 @@
struct v7fs_args *args = data;
struct v7fs_mount *v7fsmount = (void *)mp->mnt_data;
struct vnode *devvp = NULL;
- int error;
+ int error = 0;
bool update = mp->mnt_flag & MNT_UPDATE;
DPRINTF("mnt_flag=%x %s\n", mp->mnt_flag, update ? "update" : "");
Home |
Main Index |
Thread Index |
Old Index