summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/getopt.c4
-rw-r--r--util-linux/mount.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index bdf5f97..25aa406 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -238,8 +238,8 @@ static struct option *add_long_options(struct option *long_options, char *option
if (tlen == 0)
bb_error_msg_and_die("empty long option specified");
}
- long_options = xrealloc(long_options,
- sizeof(long_options[0]) * (long_nr+2));
+//TODO: zeroing version of xrealloc_vector!
+ long_options = xrealloc_vector(long_options, 4, long_nr);
long_options[long_nr].has_arg = arg_opt;
long_options[long_nr].flag = NULL;
long_options[long_nr].val = LONG_OPT;
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 2ceabce..9f9249f 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -332,7 +332,7 @@ static long parse_mount_options(char *options, char **unrecognized)
if (unrecognized && i == ARRAY_SIZE(mount_options)) {
// Add it to strflags, to pass on to kernel
i = *unrecognized ? strlen(*unrecognized) : 0;
- *unrecognized = xrealloc(*unrecognized, i+strlen(options)+2);
+ *unrecognized = xrealloc(*unrecognized, i + strlen(options) + 2);
// Comma separated if it's not the first one
if (i) (*unrecognized)[i++] = ',';