tree-wide: replace strverscmp() and str_verscmp() with strverscmp_improved()

This commit is contained in:
Yu Watanabe
2021-02-09 14:25:03 +09:00
parent 87b7d9b6ff
commit 8087644a13
8 changed files with 10 additions and 131 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ static int boot_loader_read_conf(const char *path, BootConfig *config) {
}
static int boot_entry_compare(const BootEntry *a, const BootEntry *b) {
return str_verscmp(a->id, b->id);
return strverscmp_improved(a->id, b->id);
}
static int boot_entries_find(
+1 -1
View File
@@ -247,7 +247,7 @@ static int condition_test_kernel_version(Condition *c, char **env) {
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Unexpected end of expression: %s", p);
}
r = test_order(str_verscmp(u.release, s), order);
r = test_order(strverscmp_improved(u.release, s), order);
} else
/* No prefix? Then treat as glob string */
r = fnmatch(s, u.release, 0) == 0;