summaryrefslogtreecommitdiff
path: root/sbin/fsck_msdos/dir.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-02-28 08:36:13 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-02-28 08:36:13 +0000
commit1e73b9e2b419a4ba9837730df1e3b9306f0174a5 (patch)
tree240c1fb3edf5a08d67d1f12b66bae120ef4b264d /sbin/fsck_msdos/dir.c
parent705d1d9fe851b2099838aeea8759201df5cf9c2d (diff)
From NetBSD (ws)
Fix handling of clusters marked bad; Noted by Rafal Boni
Diffstat (limited to 'sbin/fsck_msdos/dir.c')
-rw-r--r--sbin/fsck_msdos/dir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/fsck_msdos/dir.c b/sbin/fsck_msdos/dir.c
index 7a6133706a5..92b21c05f8e 100644
--- a/sbin/fsck_msdos/dir.c
+++ b/sbin/fsck_msdos/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.5 1996/09/18 06:59:03 mickey Exp $ */
+/* $OpenBSD: dir.c,v 1.6 1997/02/28 08:36:11 millert Exp $ */
/* $NetBSD: dir.c,v 1.1.4.1 1996/05/31 18:41:38 jtc Exp $ */
/*
@@ -37,7 +37,7 @@
#ifndef lint
-static char rcsid[] = "$OpenBSD: dir.c,v 1.5 1996/09/18 06:59:03 mickey Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.6 1997/02/28 08:36:11 millert Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -167,7 +167,7 @@ fullpath(dir)
break;
memcpy(cp, np, nl);
*--cp = '/';
- } while (dir = dir->parent);
+ } while ((dir = dir->parent));
if (dir != NULL && dir->parent != NULL)
*--cp = '?';
return cp;
@@ -238,7 +238,7 @@ finishDosDirSection()
}
pendingDirectories = 0;
for (d = rootDir; d; d = nd) {
- if (nd = d->child) {
+ if ((nd = d->child)) {
d->child = 0;
continue;
}
@@ -498,7 +498,7 @@ readDosDirSection(f, boot, fat, dir)
vallfn = p;
valcl = cl;
} else if (shortSum != p[13]
- || lidx != *p & LRNOMASK) {
+ || lidx != (*p & LRNOMASK)) {
if (!invlfn) {
invlfn = vallfn;
invcl = valcl;