From: Emil Velikov Date: Sat, 7 Sep 2024 00:15:04 +0000 (+0100) Subject: shared: add trailing comma for multi-line arrays X-Git-Tag: v34~409 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=13531c29278a5c002f882ac26fb2026fc1e14b1d;p=thirdparty%2Fkmod.git shared: 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 --- diff --git a/shared/hash.c b/shared/hash.c index 37a83964..2c77ef49 100644 --- a/shared/hash.c +++ b/shared/hash.c @@ -225,7 +225,7 @@ void *hash_find(const struct hash *hash, const char *key) const struct hash_bucket *bucket = hash->buckets + pos; const struct hash_entry se = { .key = key, - .value = NULL + .value = NULL, }; const struct hash_entry *entry; @@ -248,7 +248,7 @@ int hash_del(struct hash *hash, const char *key) struct hash_entry *entry, *entry_end; const struct hash_entry se = { .key = key, - .value = NULL + .value = NULL, }; entry = bsearch(&se, bucket->entries, bucket->used, diff --git a/shared/util.c b/shared/util.c index 1dfb218f..f83bc353 100644 --- a/shared/util.c +++ b/shared/util.c @@ -35,7 +35,7 @@ static const struct kmod_ext { #ifdef ENABLE_ZSTD {".ko.zst", sizeof(".ko.zst") - 1}, #endif - { } + { }, }; /* string handling functions and memory allocations */