]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
io-util: introduce IOVEC_NULL
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 04:09:46 +0000 (13:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 06:09:59 +0000 (15:09 +0900)
src/basic/io-util.h

index e7e78e91215074e30662287b6e79b60621107dd0..767c8af8fe0b2fdb0e30e97aec5b551465ae6053 100644 (file)
@@ -74,6 +74,7 @@ static inline bool FILE_SIZE_VALID_OR_INFINITY(uint64_t l) {
 
 }
 
+#define IOVEC_NULL (struct iovec) {}
 #define IOVEC_INIT(base, len) { .iov_base = (base), .iov_len = (len) }
 #define IOVEC_MAKE(base, len) (struct iovec) IOVEC_INIT(base, len)
 #define IOVEC_INIT_STRING(string) IOVEC_INIT((char*) string, strlen(string))