Module Name: src
Committed By: christos
Date: Thu Jul 10 21:00:52 UTC 2014
Modified Files:
src/sbin/fsck_msdos: fat.c
Log Message:
Bring in a regression for the previous fix from OpenBSD
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/fsck_msdos/fat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck_msdos/fat.c
diff -u src/sbin/fsck_msdos/fat.c:1.27 src/sbin/fsck_msdos/fat.c:1.28
--- src/sbin/fsck_msdos/fat.c:1.27 Mon Jul 7 14:46:45 2014
+++ src/sbin/fsck_msdos/fat.c Thu Jul 10 17:00:52 2014
@@ -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 @@ writefat(int fs, struct bootblock *boot,
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;
}