summaryrefslogtreecommitdiffhomepage
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modinfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
index 7c978d1da..0ab942890 100644
--- a/modutils/modinfo.c
+++ b/modutils/modinfo.c
@@ -34,14 +34,14 @@ struct modinfo_env {
int tags;
};
-static int display(const char *data, const char *pattern, int flag)
+static void display(const char *data, const char *pattern, int flag)
{
if (flag) {
int n = printf("%s:", pattern);
while (n++ < 16)
bb_putchar(' ');
}
- return printf("%s%c", data, (option_mask32 & OPT_0) ? '\0' : '\n');
+ printf("%s%c", data, (option_mask32 & OPT_0) ? '\0' : '\n');
}
static void modinfo(const char *path, const char *version,
@@ -104,7 +104,8 @@ static void modinfo(const char *path, const char *version,
/* field prefixes are 0x80 or 0x00 */
if ((ptr[-1] & 0x7F) == '\0') {
ptr += length + 1;
- ptr += display(ptr, pattern, (1<<j) != tags);
+ display(ptr, pattern, (1<<j) != tags);
+ ptr += strlen(ptr);
}
}
++ptr;