Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_msdos We already incremented cl; fix indexing. Not...
details: https://anonhg.NetBSD.org/src/rev/deb35f5c3d06
branches: trunk
changeset: 451778:deb35f5c3d06
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 04 00:08:00 2019 +0000
description:
We already incremented cl; fix indexing. Noticed by Xin Li @FreeBSD.
diffstat:
sbin/fsck_msdos/fat.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 91fac301bc73 -r deb35f5c3d06 sbin/fsck_msdos/fat.c
--- a/sbin/fsck_msdos/fat.c Mon Jun 03 15:49:04 2019 +0000
+++ b/sbin/fsck_msdos/fat.c Tue Jun 04 00:08:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fat.c,v 1.29 2014/07/11 14:59:53 christos Exp $ */
+/* $NetBSD: fat.c,v 1.30 2019/06/04 00:08:00 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.29 2014/07/11 14:59:53 christos Exp $");
+__RCSID("$NetBSD: fat.c,v 1.30 2019/06/04 00:08:00 christos Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -562,8 +562,8 @@
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].next << 4);
+ *p++ = (u_char)(fat[cl].next >> 4);
break;
}
}
Home |
Main Index |
Thread Index |
Old Index