1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

dissect: use structured initialization, it's prettier

This commit is contained in:
Lennart Poettering 2020-09-17 16:56:09 +02:00
parent 3afda7c797
commit 9434438543

View File

@ -1321,9 +1321,10 @@ static int decrypt_partition(
return r == -EPERM ? -EKEYREJECTED : r; return r == -EPERM ? -EKEYREJECTED : r;
} }
d->decrypted[d->n_decrypted].name = TAKE_PTR(name); d->decrypted[d->n_decrypted++] = (DecryptedPartition) {
d->decrypted[d->n_decrypted].device = TAKE_PTR(cd); .name = TAKE_PTR(name),
d->n_decrypted++; .device = TAKE_PTR(cd),
};
m->decrypted_node = TAKE_PTR(node); m->decrypted_node = TAKE_PTR(node);
@ -1540,9 +1541,10 @@ static int verity_partition(
/* Everything looks good and we'll be able to mount the device, so deferred remove will be re-enabled at that point. */ /* Everything looks good and we'll be able to mount the device, so deferred remove will be re-enabled at that point. */
restore_deferred_remove = mfree(restore_deferred_remove); restore_deferred_remove = mfree(restore_deferred_remove);
d->decrypted[d->n_decrypted].name = TAKE_PTR(name); d->decrypted[d->n_decrypted++] = (DecryptedPartition) {
d->decrypted[d->n_decrypted].device = TAKE_PTR(cd); .name = TAKE_PTR(name),
d->n_decrypted++; .device = TAKE_PTR(cd),
};
m->decrypted_node = TAKE_PTR(node); m->decrypted_node = TAKE_PTR(node);