diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-01-16 16:11:32 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-01-16 16:11:32 +0200 |
commit | 3bcddc65e3ffd69f29a68410c0604218cec8c34a (patch) | |
tree | 0ed685cad8496aec9af5c5d2c39ac5568edf1be6 /mkfs.ubifs/devtable.c | |
parent | 2416fefc0adc6061212e5ccbf166c8c987385527 (diff) |
mkfs.ubifs: fix various warnings
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'mkfs.ubifs/devtable.c')
-rw-r--r-- | mkfs.ubifs/devtable.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mkfs.ubifs/devtable.c b/mkfs.ubifs/devtable.c index 3f38339..236a6e7 100644 --- a/mkfs.ubifs/devtable.c +++ b/mkfs.ubifs/devtable.c @@ -125,7 +125,7 @@ static int separate_last(const char *buf, int len, char **path, char **name) return 0; } -static int interpret_table_entry(const char *root, const char *line) +static int interpret_table_entry(const char *line) { char buf[1024], type, *path = NULL, *name = NULL; int len; @@ -193,7 +193,7 @@ static int interpret_table_entry(const char *root, const char *line) dbg_msg(3, "inserting '%s' into path hash table", path); ph_elt = malloc(sizeof(struct path_htbl_element)); if (!ph_elt) { - err_msg("cannot allocate %d bytes of memory", + err_msg("cannot allocate %zd bytes of memory", sizeof(struct path_htbl_element)); goto out_free; } @@ -226,7 +226,7 @@ static int interpret_table_entry(const char *root, const char *line) /* This entry does not require any iterating */ nh_elt = malloc(sizeof(struct name_htbl_element)); if (!nh_elt) { - err_msg("cannot allocate %d bytes of memory", + err_msg("cannot allocate %zd bytes of memory", sizeof(struct name_htbl_element)); goto out_free; } @@ -254,7 +254,7 @@ static int interpret_table_entry(const char *root, const char *line) for (i = start; i < num; i++) { nh_elt = malloc(sizeof(struct name_htbl_element)); if (!nh_elt) { - err_msg("cannot allocate %d bytes of memory", + err_msg("cannot allocate %zd bytes of memory", sizeof(struct name_htbl_element)); goto out_free; } @@ -311,7 +311,7 @@ out_free: * Returns zero in case of success and a negative error code in case of * failure. */ -int parse_devtable(const char *root, const char *tbl_file) +int parse_devtable(const char *tbl_file) { FILE *f; char *line = NULL; @@ -358,7 +358,7 @@ int parse_devtable(const char *root, const char *tbl_file) /* If this is not a comment line, try to interpret it */ if (len && *line != '#') { - if (interpret_table_entry(root, line)) { + if (interpret_table_entry(line)) { err_msg("cannot parse '%s'", line); goto out_close; } |