mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
creds-tool: don't declare variable in switch body
The lifetime of variables decalred in the main switch/case body is just weird. Let's not rely on it, but just open a new {} block, like everywhere else in similar cases.
This commit is contained in:
parent
4f4e9104f3
commit
108bb8d065
@ -832,13 +832,14 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
arg_tpm2_device = streq(optarg, "auto") ? NULL : optarg;
|
||||
break;
|
||||
|
||||
case ARG_TPM2_PCRS:
|
||||
case ARG_TPM2_PCRS: {
|
||||
uint32_t mask;
|
||||
|
||||
if (isempty(optarg)) {
|
||||
arg_tpm2_pcr_mask = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t mask;
|
||||
r = tpm2_parse_pcrs(optarg, &mask);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@ -849,6 +850,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
arg_tpm2_pcr_mask |= mask;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ARG_NAME:
|
||||
if (isempty(optarg)) {
|
||||
|
Loading…
Reference in New Issue
Block a user