summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_msdosfs/dir.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2010-06-20 09:40:54 +0000
committerbrian <brian@FreeBSD.org>2010-06-20 09:40:54 +0000
commitf4323232d9473d9b7d302f1a5113254e321b0dd0 (patch)
treeca785311050d789fc6777c8d85b147548a7a5afb /sbin/fsck_msdosfs/dir.c
parentf16fb8206ed902d68fd499178f91de0b8d64c8f9 (diff)
downloadFreeBSD-src-f4323232d9473d9b7d302f1a5113254e321b0dd0.zip
FreeBSD-src-f4323232d9473d9b7d302f1a5113254e321b0dd0.tar.gz
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
Diffstat (limited to 'sbin/fsck_msdosfs/dir.c')
-rw-r--r--sbin/fsck_msdosfs/dir.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c
index 181fa37..f2ecff3 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];
OpenPOWER on IntegriCloud