Module Name: src
Committed By: hannken
Date: Fri Dec 28 08:04:00 UTC 2012
Modified Files:
src/sys/fs/msdosfs: msdosfs_vnops.c
Log Message:
Move the initialization of n to after the error branch.
>From Taylor R Campbell <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/fs/msdosfs/msdosfs_vnops.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/fs/msdosfs/msdosfs_vnops.c
diff -u src/sys/fs/msdosfs/msdosfs_vnops.c:1.84 src/sys/fs/msdosfs/msdosfs_vnops.c:1.85
--- src/sys/fs/msdosfs/msdosfs_vnops.c:1.84 Thu Dec 20 08:03:42 2012
+++ src/sys/fs/msdosfs/msdosfs_vnops.c Fri Dec 28 08:03:59 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.84 2012/12/20 08:03:42 hannken Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.85 2012/12/28 08:03:59 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.84 2012/12/20 08:03:42 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.85 2012/12/28 08:03:59 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -525,10 +525,10 @@ msdosfs_read(void *v)
*/
error = bread(pmp->pm_devvp, de_bn2kb(pmp, lbn), blsize,
NOCRED, 0, &bp);
- n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
if (error) {
goto bad;
}
+ n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
error = uiomove((char *)bp->b_data + on, (int) n, uio);
brelse(bp, 0);
} while (error == 0 && uio->uio_resid > 0 && n != 0);