]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev/iocost: arg_target_solution is always non-NULL
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 02:19:53 +0000 (11:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 02:19:53 +0000 (11:19 +0900)
src/udev/iocost/iocost.c

index 2ded9ab9f78240097659bccb462694bbdb7ccbec..15afdacd310a171bf79f7bac092fc47dfc603f04 100644 (file)
@@ -128,7 +128,7 @@ static int choose_solution(char **solutions, const char **ret_name) {
                 return log_error_errno(
                                 SYNTHETIC_ERRNO(EINVAL), "IOCOST_SOLUTIONS exists in hwdb but is empty.");
 
-        if (arg_target_solution && strv_find(solutions, arg_target_solution)) {
+        if (strv_contains(solutions, arg_target_solution)) {
                 *ret_name = arg_target_solution;
                 log_debug("Selected solution based on target solution: %s", *ret_name);
         } else {