diff options
author | Brian Somers <brian@FreeBSD.org> | 2010-06-20 09:40:54 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2010-06-20 09:40:54 +0000 |
commit | 48790afa7b8a3cf5e3315f9aaa8fff8a549dadc7 (patch) | |
tree | ca785311050d789fc6777c8d85b147548a7a5afb /sbin/fsck_msdosfs/dir.c | |
parent | 3ba0e47047c6fb9b3a502a49731f510ec3c84fbc (diff) |
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
Notes
Notes:
svn path=/head/; revision=209364
Diffstat (limited to 'sbin/fsck_msdosfs/dir.c')
-rw-r--r-- | sbin/fsck_msdosfs/dir.c | 15 |
1 files changed, 10 insertions, 5 deletions
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]; |