From: Yu Watanabe Date: Fri, 17 Apr 2026 22:19:27 +0000 (+0900) Subject: iovec-util: introduce iovec_equal() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20558ddb5aa37f2e511d787c9f1be1152985865c;p=thirdparty%2Fsystemd.git iovec-util: introduce iovec_equal() --- diff --git a/src/basic/iovec-util.h b/src/basic/iovec-util.h index 00cbb89a779..21aad9edfc1 100644 --- a/src/basic/iovec-util.h +++ b/src/basic/iovec-util.h @@ -38,6 +38,9 @@ char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const ch void iovec_array_free(struct iovec *iovec, size_t n_iovec) _nonnull_if_nonzero_(1, 2); int iovec_memcmp(const struct iovec *a, const struct iovec *b) _pure_; +static inline bool iovec_equal(const struct iovec *a, const struct iovec *b) { + return iovec_memcmp(a, b) == 0; +} struct iovec* iovec_memdup(const struct iovec *source, struct iovec *ret);