commit c68ae2f00b30dbe8bf6bce498e35728a7e4adcb2
parent 2cc4fdbf454f9409b9e37015cab7c118fdae45b3
Author: Patrik Flykt <patrik.flykt@linux.intel.com>
Date: Mon, 5 Nov 2018 10:13:24 -0700
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.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -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);