]> git.ipfire.org Git - thirdparty/grub.git/commit
net: Break out nested function
authorJavier Martinez Canillas <javierm@redhat.com>
Tue, 19 May 2020 15:53:03 +0000 (17:53 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 25 May 2020 12:52:10 +0000 (14:52 +0200)
commit96be75ecbdf8c429a35cc0556c49cb71e0135801
tree958dc19738b3bffb1dfe7b6bb4597b8a6ef2207b
parentcc6bd49a522a4de410019f98951fd421a41aeccc
net: Break out nested function

Nested functions are not supported in C, but are permitted as an extension
in the GNU C dialect. Commit cb2f15c5448 ("normal/main: Search for specific
config files for netboot") added a nested function which caused the build
to break when compiling with clang.

Break that out into a static helper function to make the code portable again.

Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/net.c