Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs Move the initialization of n to after the err...
details: https://anonhg.NetBSD.org/src/rev/bf905050a0d5
branches: trunk
changeset: 783543:bf905050a0d5
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Dec 28 08:03:59 2012 +0000
description:
Move the initialization of n to after the error branch.
>From Taylor R Campbell <riastradh%netbsd.org@localhost>
diffstat:
sys/fs/msdosfs/msdosfs_vnops.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r e235a252cb6c -r bf905050a0d5 sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c Fri Dec 28 07:10:41 2012 +0000
+++ b/sys/fs/msdosfs/msdosfs_vnops.c Fri Dec 28 08:03:59 2012 +0000
@@ -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 @@
*/
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);
Home |
Main Index |
Thread Index |
Old Index