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
This commit is contained in:
Lennart Poettering
2023-10-19 16:27:16 +02:00
parent c24e0dbea1
commit e2a3bb22c8

View File

@@ -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) \
({ \