mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
iovec-util: add helper for a single NUL byte iovec
This commit is contained in:
parent
e09c255d2e
commit
045f7b8fe4
@ -8,6 +8,12 @@
|
||||
#include "alloc-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
/* An iovec pointing to a single NUL byte */
|
||||
#define IOVEC_NUL_BYTE (const struct iovec) { \
|
||||
.iov_base = (void*) (const uint8_t[1]) { 0 }, \
|
||||
.iov_len = 1, \
|
||||
}
|
||||
|
||||
size_t iovec_total_size(const struct iovec *iovec, size_t n);
|
||||
|
||||
bool iovec_increment(struct iovec *iovec, size_t n, size_t k);
|
||||
|
Loading…
Reference in New Issue
Block a user