]> err.no Git - systemd/commitdiff
macro: move IOVEC_SET_STRING into macro.h
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:54:19 +0000 (21:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:54:19 +0000 (21:54 +0200)
logger.c
macro.h

index 8ce9685c62a4494509a5d92a078c2708a1d17f81..46cce5f09d074747ac84748fd5ccd071f9d49793 100644 (file)
--- 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 76ae465b90f2754a7b001be9617a9a8e7386ee76..2eaa3d6fbbdadbf5075a99d825423a815ff08e6a 100644 (file)
--- 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