summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-04-04 19:39:04 +0200
committerMike Yuan <me@yhndnzj.com>2023-04-05 13:06:26 +0800
commit51214cf49195b645bd58b0c41046470908de71d9 (patch)
tree458ded0c5ca7807fe2bd38de631756784bcbd97a /src/boot
parent96181b7a893da444fa9adcd1e7c95769d97c2a95 (diff)
downloadsystemd-51214cf49195b645bd58b0c41046470908de71d9.tar.gz
various: simplify calls to parse_boolean_argument()
parse_boolean_argument() returns the same information via both the output argument and normal return.
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 710cf8da65..82c7e498ba 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -248,7 +248,6 @@ static int parse_argv(int argc, char *argv[]) {
};
int c, r;
- bool b;
assert(argc >= 0);
assert(argv);
@@ -338,11 +337,11 @@ static int parse_argv(int argc, char *argv[]) {
if (streq(optarg, "auto")) /* retained for backwards compatibility */
arg_make_entry_directory = -1; /* yes if machine-id is permanent */
else {
- r = parse_boolean_argument("--make-entry-directory=", optarg, &b);
+ r = parse_boolean_argument("--make-entry-directory=", optarg, NULL);
if (r < 0)
return r;
- arg_make_entry_directory = b;
+ arg_make_entry_directory = r;
}
break;
@@ -366,7 +365,8 @@ static int parse_argv(int argc, char *argv[]) {
}
if (strlen(optarg) > EFI_BOOT_OPTION_DESCRIPTION_MAX)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
- "--efi-boot-option-description= too long: %zu > %zu", strlen(optarg), EFI_BOOT_OPTION_DESCRIPTION_MAX);
+ "--efi-boot-option-description= too long: %zu > %zu",
+ strlen(optarg), EFI_BOOT_OPTION_DESCRIPTION_MAX);
r = free_and_strdup_warn(&arg_efi_boot_option_description, optarg);
if (r < 0)
return r;