3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

main: Log optimized implementations only when they exist

Log optimized implementations strings only when the hashmap contains
items in order to avoid an unnecessary line of text with no members
printed out.
This commit is contained in:
Patrik Flykt 2018-11-05 10:13:24 -07:00 committed by Denis Kenzior
parent 2cc4fdbf45
commit c68ae2f00b

View File

@ -337,8 +337,11 @@ static int check_crypto()
l_hashmap_foreach(options, print_koption, NULL);
l_info("The following optimized implementations might be available:");
l_hashmap_foreach(optional, print_koption, NULL);
if (!l_hashmap_isempty(optional)) {
l_info("The following optimized implementations might be "
"available:");
l_hashmap_foreach(optional, print_koption, NULL);
}
done:
l_hashmap_destroy(options, NULL);