From: Frantisek Sumsal Date: Mon, 25 Dec 2023 11:54:35 +0000 (+0100) Subject: tree-wide: use IOVEC_MAKE() in a couple more places X-Git-Tag: v256-rc1~1384^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c490b6ddc24205ff9d50d9e9da361d9b1866dbfc;p=thirdparty%2Fsystemd.git tree-wide: use IOVEC_MAKE() in a couple more places --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 1e9284e2e2e..95cae94a8e0 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -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 diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index f0fa8704376..ffcddc13d48 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -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);