Module Name: src
Committed By: bouyer
Date: Fri Feb 18 14:48:54 UTC 2011
Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c
Log Message:
Initialize error in snapshot_expunge(); if the list is empty error would
be returned uninitialized. t_snapshot_v2 was failing for me when
librumpffs was compiled DGB=-g.
No idea why gcc didn't catch this ...
To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/ufs/ffs/ffs_snapshot.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.104 src/sys/ufs/ffs/ffs_snapshot.c:1.105
--- src/sys/ufs/ffs/ffs_snapshot.c:1.104 Fri Feb 18 08:39:13 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c Fri Feb 18 14:48:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $ */
+/* $NetBSD: ffs_snapshot.c,v 1.105 2011/02/18 14:48:54 bouyer Exp $ */
/*
* Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.104 2011/02/18 08:39:13 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.105 2011/02/18 14:48:54 bouyer Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -563,7 +563,7 @@
snapshot_expunge(struct mount *mp, struct vnode *vp, struct fs *copy_fs,
daddr_t *snaplistsize, daddr_t **snaplist)
{
- int cg, error, len, loc;
+ int cg, error = 0, len, loc;
daddr_t blkno, *blkp;
struct fs *fs = VFSTOUFS(mp)->um_fs;
struct inode *xp;