diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-26 11:36:28 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-26 11:36:28 +0900 |
commit | dcb379619ff4a3ecdeae5bc7ff466ed22efe3768 (patch) | |
tree | 7dbd861751b7009b2decaaa1b3b1921ab3383dc9 /src/udev/iocost | |
parent | 878f3a4f0949bba4a2e1d0084e8d45cae125fe66 (diff) | |
download | systemd-dcb379619ff4a3ecdeae5bc7ff466ed22efe3768.tar.gz |
udev/iocost: drop unnecessary initializations
Diffstat (limited to 'src/udev/iocost')
-rw-r--r-- | src/udev/iocost/iocost.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/udev/iocost/iocost.c b/src/udev/iocost/iocost.c index 15afdacd31..83b43ec109 100644 --- a/src/udev/iocost/iocost.c +++ b/src/udev/iocost/iocost.c @@ -147,7 +147,7 @@ static int query_named_solution( _cleanup_strv_free_ char **solutions = NULL; _cleanup_free_ char *upper_name = NULL, *qos_key = NULL, *model_key = NULL; - const char *qos = NULL, *model = NULL; + const char *qos, *model; int r; assert(ret_qos); @@ -204,7 +204,7 @@ static int query_named_solution( static int apply_solution_for_path(const char *path, const char *name) { _cleanup_(sd_device_unrefp) sd_device *device = NULL; _cleanup_free_ char *qos = NULL, *model = NULL; - const char *qos_params = NULL, *model_params = NULL; + const char *qos_params, *model_params; dev_t devnum; int r; @@ -250,8 +250,7 @@ static int apply_solution_for_path(const char *path, const char *name) { static int query_solutions_for_path(const char *path) { _cleanup_(sd_device_unrefp) sd_device *device = NULL; _cleanup_strv_free_ char **solutions = NULL; - const char *default_solution = NULL; - const char *model_name = NULL; + const char *default_solution, *model_name; int r; r = sd_device_new_from_path(&device, path); @@ -289,7 +288,7 @@ static int query_solutions_for_path(const char *path) { arg_target_solution, default_solution); STRV_FOREACH(s, solutions) { - const char *model = NULL, *qos = NULL; + const char *model, *qos; r = query_named_solution(device, *s, &model, &qos); if (r < 0 || !model || !qos) |