Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_msdos Bring in a regression for the previous fix f...



details:   https://anonhg.NetBSD.org/src/rev/75eb52bee61e
branches:  trunk
changeset: 330475:75eb52bee61e
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 10 21:00:52 2014 +0000

description:
Bring in a regression for the previous fix from OpenBSD

diffstat:

 sbin/fsck_msdos/fat.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r fcd4214603cd -r 75eb52bee61e sbin/fsck_msdos/fat.c
--- a/sbin/fsck_msdos/fat.c     Thu Jul 10 19:21:46 2014 +0000
+++ b/sbin/fsck_msdos/fat.c     Thu Jul 10 21:00:52 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fat.c,v 1.27 2014/07/07 18:46:45 christos Exp $        */
+/*     $NetBSD: fat.c,v 1.28 2014/07/10 21:00:52 christos Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fat.c,v 1.27 2014/07/07 18:46:45 christos Exp $");
+__RCSID("$NetBSD: fat.c,v 1.28 2014/07/10 21:00:52 christos Exp $");
 #endif /* not lint */
 
 #include <stdlib.h>
@@ -555,13 +555,13 @@
                        if (fat[cl].next == CLUST_FREE)
                                boot->NumFree++;
                        *p++ = (u_char)fat[cl].next;
-                       *p++ = (u_char)((fat[cl].next >> 8) & 0xf);
+                       *p = (u_char)((fat[cl].next >> 8) & 0xf);
                        cl++;
                        if (cl >= boot->NumClusters)
                                break;
                        if (fat[cl].next == CLUST_FREE)
                                boot->NumFree++;
-                       *p |= (u_char)(fat[cl + 1].next << 4);
+                       *p++ |= (u_char)(fat[cl + 1].next << 4);
                        *p++ = (u_char)(fat[cl + 1].next >> 4);
                        break;
                }



Home | Main Index | Thread Index | Old Index