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
1 changed files with 5 additions and 2 deletions

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);