diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-07-25 09:49:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-07-25 12:47:23 +0200 |
commit | 05abe850330fdef145d8d45d5a2e33d76a0a8d21 (patch) | |
tree | c715e37f0b8e20a156446b13116df0074e9cc370 /src/shared | |
parent | systemctl: fix type used for array sizes to size_t (diff) | |
download | systemd-05abe850330fdef145d8d45d5a2e33d76a0a8d21.tar.xz systemd-05abe850330fdef145d8d45d5a2e33d76a0a8d21.zip |
boot: a couple of tweaks recommended by Coccinelle
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/find-esp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index 87ac9d167e..14c1ce0b45 100644 --- a/src/shared/find-esp.c +++ b/src/shared/find-esp.c @@ -416,7 +416,7 @@ int find_esp_and_warn( "Failed to resolve path %s%s%s: %m", path, root ? " under directory " : "", - root ?: ""); + strempty(root)); r = verify_esp(p, ret_part, ret_pstart, ret_psize, ret_uuid, ret_devid, flags); if (r < 0) @@ -435,7 +435,7 @@ int find_esp_and_warn( "Failed to resolve path %s%s%s: %m", path, root ? " under directory " : "", - root ?: ""); + strempty(root)); if (!path_is_valid(p) || !path_is_absolute(p)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), @@ -474,7 +474,7 @@ int find_esp_and_warn( "Failed to resolve path %s%s%s: %m", dir, root ? " under directory " : "", - root ?: ""); + strempty(root)); r = verify_esp(p, ret_part, ret_pstart, ret_psize, ret_uuid, ret_devid, flags | VERIFY_ESP_SEARCHING); @@ -712,7 +712,7 @@ int find_xbootldr_and_warn( "Failed to resolve path %s%s%s: %m", path, root ? " under directory " : "", - root ?: ""); + strempty(root)); r = verify_xbootldr(p, /* searching= */ false, unprivileged_mode, ret_uuid, ret_devid); if (r < 0) @@ -731,7 +731,7 @@ int find_xbootldr_and_warn( "Failed to resolve path %s%s%s: %m", path, root ? " under directory " : "", - root ?: ""); + strempty(root)); if (!path_is_valid(p) || !path_is_absolute(p)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), @@ -758,7 +758,7 @@ int find_xbootldr_and_warn( return log_error_errno(r, "Failed to resolve path /boot%s%s: %m", root ? " under directory " : "", - root ?: ""); + strempty(root)); r = verify_xbootldr(p, true, unprivileged_mode, ret_uuid, ret_devid); if (r >= 0) |