[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1394595670-11193-1-git-send-email-tytso@mit.edu>
Date: Tue, 11 Mar 2014 23:41:10 -0400
From: Theodore Ts'o <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc: Theodore Ts'o <tytso@....edu>
Subject: [PATCH] create_inode: fix gcc -Wall complaints
We had several functions that were not returning zero on success. Fix
this.
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
misc/create_inode.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/misc/create_inode.c b/misc/create_inode.c
index 42ac6b2..964c66a 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -86,10 +86,9 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t cwd,
fill_inode(&inode, st);
retval = ext2fs_write_inode(fs, ino, &inode);
- if (retval) {
+ if (retval)
com_err(__func__, retval, "while writing inode %u", ino);
- return retval;
- }
+ return retval;
}
/* Make a special file which is block, character and fifo */
@@ -115,6 +114,9 @@ errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd, const char *name,
mode = LINUX_S_IFIFO;
filetype = EXT2_FT_FIFO;
break;
+ default:
+ abort();
+ /* NOTREACHED */
}
if (!(fs->flags & EXT2_FLAG_RW)) {
@@ -204,11 +206,9 @@ try_again:
}
goto try_again;
}
- if (retval) {
+ if (retval)
com_err("ext2fs_symlink", retval, 0);
- return retval;
- }
-
+ return retval;
}
/* Make a directory in the fs */
@@ -243,10 +243,9 @@ try_again:
}
goto try_again;
}
- if (retval) {
+ if (retval)
com_err("ext2fs_mkdir", retval, 0);
- return retval;
- }
+ return retval;
}
static errcode_t copy_file(ext2_filsys fs, int fd, ext2_ino_t newfile,
--
1.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists