aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-25 10:55:35 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-25 10:55:35 +0000
commit80b8b39899a09c7516920cda5fd343b3086d4824 (patch)
treeaa9903fd6b64d19c5f640fa302272d85c92b204e /util-linux/mount.c
parent1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff)
downloadbusybox-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index fe2f1d969..4dd1a85a2 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -120,7 +120,6 @@ struct {
{"remount", MS_REMOUNT}, // action flag
};
-#define VECTOR_SIZE(v) (sizeof(v) / sizeof((v)[0]))
/* Append mount options to string */
static void append_mount_options(char **oldopts, const char *newopts)
@@ -168,7 +167,7 @@ static int parse_mount_options(char *options, char **unrecognized)
if (comma) *comma = 0;
// Find this option in mount_options
- for (i = 0; i < VECTOR_SIZE(mount_options); i++) {
+ for (i = 0; i < ARRAY_SIZE(mount_options); i++) {
if (!strcasecmp(mount_options[i].name, options)) {
long fl = mount_options[i].flags;
if (fl < 0) flags &= fl;
@@ -177,7 +176,7 @@ static int parse_mount_options(char *options, char **unrecognized)
}
}
// If unrecognized not NULL, append unrecognized mount options */
- if (unrecognized && i == VECTOR_SIZE(mount_options)) {
+ 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);