From e2a3bb22c8a0fc0f4d1b07dc1780709ec3cbfa5e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 19 Oct 2023 16:27:16 +0200 Subject: [PATCH] iovec-util: make IOVEC_NULL const compound initialized structs can be placed im immutable memory if const, hence there's benefit in making this one const too --- src/basic/iovec-util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/basic/iovec-util.h b/src/basic/iovec-util.h index 670f57464a..d46455371b 100644 --- a/src/basic/iovec-util.h +++ b/src/basic/iovec-util.h @@ -32,7 +32,8 @@ static inline bool IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) { return true; } -#define IOVEC_NULL (struct iovec) {} +#define IOVEC_NULL (const struct iovec) {} + #define IOVEC_MAKE(base, len) (struct iovec) { .iov_base = (base), .iov_len = (len) } #define IOVEC_MAKE_STRING(string) \ ({ \ -- 2.25.1