]> git.ipfire.org Git - thirdparty/grub.git/commit
grub-install: Locale depends on nls
authorOlaf Hering <olaf@aepfle.de>
Fri, 13 Apr 2018 21:36:49 +0000 (23:36 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 23 Apr 2018 11:13:11 +0000 (13:13 +0200)
commit3d8439da8c9a4acf9bc1c41b364ec6e1680ef052
treeba97ee412724cf9342cbaad1c464a4d8eda268ca
parent9dcac673ed08e874d883c6dc5af2017fb28eb3d5
grub-install: Locale depends on nls

With --disable-nls no locales exist.

Avoid runtime error by moving code that copies locales into its own
function. Return early in case nls was disabled. That way the compiler
will throw away unreachable code, no need to put preprocessor
conditionals everywhere to avoid warnings about unused code.

Fix memleak by freeing srcf and dstf.
Convert tabs to spaces in moved code.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-install-common.c