From: Lennart Poettering Date: Thu, 19 Oct 2023 14:27:16 +0000 (+0200) Subject: iovec-util: make IOVEC_NULL const X-Git-Tag: v255-rc1~186^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2a3bb22c8a0fc0f4d1b07dc1780709ec3cbfa5e;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/basic/iovec-util.h b/src/basic/iovec-util.h index 670f57464ac..d46455371b1 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) \ ({ \