From 2b355954cbaf84a0af86410af996a21b2818322f Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sat, 7 Sep 2024 01:15:04 +0100 Subject: [PATCH] tools: add trailing comma for multi-line arrays ... otherwise the upcoming clang-format will try to fold them on single line, making the end result far from ideal. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/114 Signed-off-by: Lucas De Marchi --- tools/depmod.c | 6 +++--- tools/insmod.c | 2 +- tools/kmod.c | 2 +- tools/modinfo.c | 2 +- tools/modprobe.c | 2 +- tools/rmmod.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/depmod.c b/tools/depmod.c index 03fcff33..06e72eea 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -44,7 +44,7 @@ static const char *const default_cfg_paths[] = { "/usr/local/lib/depmod.d", DISTCONFDIR "/depmod.d", "/lib/depmod.d", - NULL + NULL, }; static const char cmdopts_s[] = "aAb:o:C:E:F:euqrvnP:wmVh"; @@ -68,7 +68,7 @@ static const struct option cmdopts[] = { { "map", no_argument, 0, 'm' }, /* deprecated */ { "version", no_argument, 0, 'V' }, { "help", no_argument, 0, 'h' }, - { } + { }, }; static void help(void) @@ -2579,7 +2579,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) { "modules.builtin.bin", output_builtin_bin }, { "modules.builtin.alias.bin", output_builtin_alias_bin }, { "modules.devname", output_devname }, - { } + { }, }; const char *dname = depmod->cfg->outdirname; int dfd, err = 0; diff --git a/tools/insmod.c b/tools/insmod.c index 4a1d11d1..9323fffc 100644 --- a/tools/insmod.c +++ b/tools/insmod.c @@ -19,7 +19,7 @@ static const char cmdopts_s[] = "psfVh"; static const struct option cmdopts[] = { {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, - {NULL, 0, 0, 0} + {NULL, 0, 0, 0}, }; static void help(void) diff --git a/tools/kmod.c b/tools/kmod.c index d28ec7ba..e5314f6c 100644 --- a/tools/kmod.c +++ b/tools/kmod.c @@ -20,7 +20,7 @@ static const char options_s[] = "+hV"; static const struct option options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, - {} + {}, }; static const struct kmod_cmd kmod_cmd_help; diff --git a/tools/modinfo.c b/tools/modinfo.c index 31ffa99c..c91946c6 100644 --- a/tools/modinfo.c +++ b/tools/modinfo.c @@ -338,7 +338,7 @@ static const struct option cmdopts[] = { {"basedir", required_argument, 0, 'b'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, - {NULL, 0, 0, 0} + {NULL, 0, 0, 0}, }; static void help(void) diff --git a/tools/modprobe.c b/tools/modprobe.c index 47b721d7..c74afbb4 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -84,7 +84,7 @@ static const struct option cmdopts[] = { {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, - {NULL, 0, 0, 0} + {NULL, 0, 0, 0}, }; static void help(void) diff --git a/tools/rmmod.c b/tools/rmmod.c index 0f28ce20..7dacab94 100644 --- a/tools/rmmod.c +++ b/tools/rmmod.c @@ -31,7 +31,7 @@ static const struct option cmdopts[] = { {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, - {NULL, 0, 0, 0} + {NULL, 0, 0, 0}, }; static void help(void) -- 2.47.3