summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-07-19 20:26:24 +0200
committerLennart Poettering <lennart@poettering.net>2016-07-21 11:37:58 +0200
commit181ccb43ead439059d4302252870a77ff4441688 (patch)
tree817d964574eaf77560d45597bd4ddadbebbc350a /src/boot
parent2f2c539cd4af7ca526296adecff2a6f90d7d7b0c (diff)
bootctl: make use of STRV_FOREACH() where we can
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/bootctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index 8b2407f145..d9c3897392 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -628,11 +628,11 @@ static const char *efi_subdirs[] = {
};
static int create_dirs(const char *esp_path) {
+ const char **i;
int r;
- unsigned i;
- for (i = 0; i < ELEMENTSOF(efi_subdirs); i++) {
- r = mkdir_one(esp_path, efi_subdirs[i]);
+ STRV_FOREACH(i, efi_subdirs) {
+ r = mkdir_one(esp_path, *i);
if (r < 0)
return r;
}
@@ -836,7 +836,7 @@ static int install_variables(const char *esp_path,
"Failed to access EFI variables. Is the \"efivarfs\" filesystem mounted?" :
"Failed to determine current boot order: %m");
- if (first || r == false) {
+ if (first || r == 0) {
r = efi_add_boot_option(slot, "Linux Boot Manager",
part, pstart, psize,
uuid, path);