summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-06-24 23:29:15 +0000
committerMiles Bader <miles@gnu.org>1995-06-24 23:29:15 +0000
commit949eef9ea7a913122056af51f4314a84e55a6ddf (patch)
tree0a229898145b9bfd722e02a805412c800af9f4e7 /ext2fs
parentfe33937a9c322f331d3ace302ef5b1ed8d19d944 (diff)
(diskfs_direnter): Move assignment out of test.
(diskfs_get_directs): Fix print-format types.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/dir.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index c4118b9d..889950a6 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -523,11 +523,14 @@ diskfs_direnter(struct node *dp,
oldsize = dp->dn_stat.st_size;
while (oldsize + DIRBLKSIZ > dp->allocsize)
- if (err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred))
- {
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
- return err;
- }
+ {
+ err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred);
+ if (err)
+ {
+ vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ return err;
+ }
+ }
new = (struct ext2_dir_entry *) (ds->mapbuf + oldsize);
@@ -877,7 +880,7 @@ diskfs_get_directs (struct node *dp,
if (entryp->rec_len == 0)
{
- ext2_warning ("zero length directory entry: inode: %d offset: %ld",
+ ext2_warning ("zero length directory entry: inode: %d offset: %d",
dp->dn->number,
blkno * DIRBLKSIZ + bufp - buf);
return EIO;
@@ -891,7 +894,7 @@ diskfs_get_directs (struct node *dp,
}
else if (bufp - buf > DIRBLKSIZ)
{
- ext2_warning ("directory entry too long: inode: %d offset: %ld",
+ ext2_warning ("directory entry too long: inode: %d offset: %d",
dp->dn->number,
blkno * DIRBLKSIZ + bufp - buf - entryp->rec_len);
return EIO;