]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
shared: add trailing comma for multi-line arrays
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 7 Sep 2024 00:15:04 +0000 (01:15 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 7 Sep 2024 15:13:51 +0000 (10:13 -0500)
... 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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/114
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
shared/hash.c
shared/util.c

index 37a83964d2764580258c3d25c9a029127ba65aca..2c77ef49ba3e56133dd139166467b0c6b6c66404 100644 (file)
@@ -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,
index 1dfb218f7a3bf14cb3c43333aa9d765f36be0fa1..f83bc353c49e598bac5663f66625c0f23ca2b9ff 100644 (file)
@@ -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                         */