]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: const arguments should be const
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 22:49:01 +0000 (23:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Nov 2021 16:22:23 +0000 (17:22 +0100)
Unfortunately they forgot the "const" decoration on the MetaiMatch()
prototype, but let that omission not leak into our code, let's hide it
away in the innermost use.

src/boot/efi/boot.c

index ad0c71cb21860db7bf55ca9c9da9ecc93e25b0d6..68fb94cbdce7f622d4444b0d0af5f60e627cfd78 100644 (file)
@@ -1651,14 +1651,14 @@ static void config_sort_entries(Config *config) {
         sort_pointer_array((void**) config->entries, config->entry_count, (compare_pointer_func_t) config_entry_compare);
 }
 
-static INTN config_entry_find(Config *config, CHAR16 *needle) {
+static INTN config_entry_find(Config *config, const CHAR16 *needle) {
         assert(config);
 
         if (!needle)
                 return -1;
 
         for (UINTN i = 0; i < config->entry_count; i++)
-                if (MetaiMatch(config->entries[i]->id, needle))
+                if (MetaiMatch(config->entries[i]->id, (CHAR16*) needle))
                         return (INTN) i;
 
         return -1;