From 48790afa7b8a3cf5e3315f9aaa8fff8a549dadc7 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sun, 20 Jun 2010 09:40:54 +0000 Subject: Fix some style(9), although there's a lot more issues here. Fix some casting errors. PR: 142384 Submitted by: giffunip at tutopia dot com Obtained from: NetBSD MFC after: 3 weeks --- sbin/fsck_msdosfs/dir.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sbin/fsck_msdosfs/dir.c') diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 181fa37be594..f2ecff351638 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -242,7 +242,8 @@ resetDosDirSection(struct bootblock *boot, struct fatEntry *fat) memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || + boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", boot->bpbRootClust); return FSFATAL; @@ -356,7 +357,8 @@ removede(int f, struct bootblock *boot, struct fatEntry *fat, u_char *start, pwarn("Invalid long filename entry for %s\n", path); break; case 1: - pwarn("Invalid long filename entry at end of directory %s\n", path); + pwarn("Invalid long filename entry at end of directory %s\n", + path); break; case 2: pwarn("Invalid long filename entry for volume label\n"); @@ -418,7 +420,8 @@ checksize(struct bootblock *boot, struct fatEntry *fat, u_char *p, cl_t cl; u_int32_t sz = 0; - for (cl = dir->head; (sz += boot->ClusterSize) < dir->size;) + for (cl = dir->head; (sz += boot->ClusterSize) < + dir->size;) cl = fat[cl].next; clearchain(boot, fat, fat[cl].next); fat[cl].next = CLUST_EOF; @@ -462,7 +465,8 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, do { if (!(boot->flags & FAT32) && !dir->parent) { last = boot->bpbRootDirEnts * 32; - off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; + off = boot->bpbResSectors + boot->bpbFATs * + boot->FATsecs; } else { last = boot->bpbSecPerClust * boot->bpbBytesPerSec; off = cl * boot->bpbSecPerClust + boot->ClusterOffset; @@ -547,7 +551,8 @@ readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat, } lidx = *p & LRNOMASK; t = longName + --lidx * 13; - for (k = 1; k < 11 && t < longName + sizeof(longName); k += 2) { + for (k = 1; k < 11 && t < longName + + sizeof(longName); k += 2) { if (!p[k] && !p[k + 1]) break; *t++ = p[k]; -- cgit v1.2.3