From 2fa086a8e02b1b2d62a9a424b41944f3a2251e60 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Apr 2010 21:54:19 +0200 Subject: [PATCH] macro: move IOVEC_SET_STRING into macro.h --- logger.c | 6 ------ macro.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/logger.c b/logger.c index 8ce9685c..46cce5f0 100644 --- a/logger.c +++ b/logger.c @@ -86,12 +86,6 @@ struct Stream { LIST_FIELDS(Stream, stream); }; -#define IOVEC_SET_STRING(iovec, s) \ - do { \ - (iovec).iov_base = s; \ - (iovec).iov_len = strlen(s); \ - } while(false); - static int stream_log(Stream *s, char *p, usec_t timestamp) { char header_priority[16], header_time[64], header_pid[16]; diff --git a/macro.h b/macro.h index 76ae465b..2eaa3d6f 100644 --- a/macro.h +++ b/macro.h @@ -97,4 +97,10 @@ static inline size_t ALIGN(size_t l) { #define char_array_0(x) x[sizeof(x)-1] = 0; +#define IOVEC_SET_STRING(iovec, s) \ + do { \ + (iovec).iov_base = s; \ + (iovec).iov_len = strlen(s); \ + } while(false); + #endif -- 2.39.5