]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use IOVEC_MAKE() in a couple more places
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 11:54:35 +0000 (12:54 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 17:26:59 +0000 (18:26 +0100)
src/partition/repart.c
src/shared/tpm2-util.c

index 1e9284e2e2e855ad71c59e91b7192e6dfae24c9b..95cae94a8e069af60d0a5bfaf0a0833e8cff4abe 100644 (file)
@@ -4172,8 +4172,7 @@ static int sign_verity_roothash(
                 return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to convert PKCS7 signature to DER: %s",
                                        ERR_error_string(ERR_get_error(), NULL));
 
-        ret_signature->iov_base = TAKE_PTR(sig);
-        ret_signature->iov_len = sigsz;
+        *ret_signature = IOVEC_MAKE(TAKE_PTR(sig), sigsz);
 
         return 0;
 #else
index f0fa870437610f7d5fcd4497c7365c73b642fcd3..ffcddc13d489e87aba2b01dd45ba23413793e45f 100644 (file)
@@ -5891,10 +5891,7 @@ int tpm2_unseal_data(
                                        "Failed to unseal data: %s", sym_Tss2_RC_Decode(rc));
 
         _cleanup_(iovec_done) struct iovec d = {};
-        d = (struct iovec) {
-                .iov_base = memdup(unsealed->buffer, unsealed->size),
-                .iov_len = unsealed->size,
-        };
+        d = IOVEC_MAKE(memdup(unsealed->buffer, unsealed->size), unsealed->size);
 
         explicit_bzero_safe(unsealed->buffer, unsealed->size);