sd-boot: coding style fix, don't rely on C's downgrade-to-bool feature for numerical...
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Jun 2018 16:51:14 +0000 (18:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Oct 2018 14:44:34 +0000 (16:44 +0200)
src/boot/efi/boot.c

index 582d34f..b111106 100644 (file)
@@ -890,7 +890,7 @@ static INTN str_verscmp(CHAR16 *s1, CHAR16 *s2) {
                         INTN order;
 
                         order = c_order(*s1) - c_order(*s2);
-                        if (order)
+                        if (order != 0)
                                 return order;
                         s1++;
                         s2++;
@@ -914,7 +914,7 @@ static INTN str_verscmp(CHAR16 *s1, CHAR16 *s2) {
                 if (is_digit(*s2))
                         return -1;
 
-                if (first)
+                if (first != 0)
                         return first;
         }