Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/fsck_ffs A minor tweak.



details:   https://anonhg.NetBSD.org/src/rev/0633707ba32c
branches:  trunk
changeset: 501925:0633707ba32c
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Jan 09 09:25:32 2001 +0000

description:
A minor tweak.

diffstat:

 sbin/fsck_ffs/utilities.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 9591e3990a51 -r 0633707ba32c sbin/fsck_ffs/utilities.c
--- a/sbin/fsck_ffs/utilities.c Tue Jan 09 09:08:35 2001 +0000
+++ b/sbin/fsck_ffs/utilities.c Tue Jan 09 09:25:32 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utilities.c,v 1.28 2001/01/09 09:08:35 enami Exp $     */
+/*     $NetBSD: utilities.c,v 1.29 2001/01/09 09:25:32 mycroft Exp $   */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)utilities.c        8.6 (Berkeley) 5/19/95";
 #else
-__RCSID("$NetBSD: utilities.c,v 1.28 2001/01/09 09:08:35 enami Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.29 2001/01/09 09:25:32 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -240,18 +240,19 @@
                 * u_int32_t's
                 */
                if (needswap) {
+                       int k;
                        u_int32_t *cd = (u_int32_t *)sblock->fs_csp[j];
-                       int k;
+
                        for (k = 0; k < size / sizeof(u_int32_t); k++)
                                cd[k] = bswap32(cd[k]);
                }
                bwrite(fswritefd, (char *)sblock->fs_csp[j],
                    fsbtodb(sblock, sblock->fs_csaddr + j * sblock->fs_frag),
-                   sblock->fs_cssize - i < sblock->fs_bsize ?
-                   sblock->fs_cssize - i : sblock->fs_bsize);
+                   size);
                if (needswap) {
+                       int k;
                        u_int32_t *cd = (u_int32_t *)sblock->fs_csp[j];
-                       int k;
+
                        for (k = 0; k < size / sizeof(u_int32_t); k++)
                                cd[k] = bswap32(cd[k]);
                }



Home | Main Index | Thread Index | Old Index