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/boot/bootctl.c | |
parent | 46e6449acbd0bca06401415f660162861e36d1a7 (diff) | |
download | systemd-05abe850330fdef145d8d45d5a2e33d76a0a8d21.tar.gz |
boot: a couple of tweaks recommended by Coccinelle
Diffstat (limited to 'src/boot/bootctl.c')
-rw-r--r-- | src/boot/bootctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index c09c305b3f..7470157ecd 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -872,7 +872,7 @@ static int copy_one_file(const char *esp_path, const char *name, bool force) { "Failed to resolve path %s%s%s: %m", p, root ? " under directory " : "", - root ?: ""); + strempty(root)); q = path_join("/EFI/systemd/", dest_name); if (!q) @@ -918,7 +918,7 @@ static int install_binaries(const char *esp_path, const char *arch, bool force) if (r == -ENOENT && root && arg_install_source == ARG_INSTALL_SOURCE_AUTO) r = chase_symlinks_and_opendir(BOOTLIBDIR, NULL, CHASE_PREFIX_ROOT, &path, &d); if (r < 0) - return log_error_errno(r, "Failed to open boot loader directory %s%s: %m", root ?: "", BOOTLIBDIR); + return log_error_errno(r, "Failed to open boot loader directory %s%s: %m", strempty(root), BOOTLIBDIR); const char *suffix = strjoina(arch, ".efi"); const char *suffix_signed = strjoina(arch, ".efi.signed"); |