chiark / gitweb /
bus: fix counting of argN= matches
[elogind.git] / src / shared / util.h
index 99ec0a39bdc4ee1212d4f6aec5ab974c3468d4a9..b33fdb5b7a7f09ce090f16a3552e21a4be614104 100644 (file)
@@ -52,7 +52,7 @@ union dirent_storage {
 #define WHITESPACE " \t\n\r"
 #define NEWLINE "\n\r"
 #define QUOTES "\"\'"
-#define COMMENTS "#;\n"
+#define COMMENTS "#;"
 
 #define FORMAT_BYTES_MAX 8
 
@@ -657,3 +657,11 @@ static inline unsigned decimal_str_max(unsigned x) {
 }
 
 int unlink_noerrno(const char *path);
+
+#define alloca0(n)                                                      \
+        ({                                                              \
+                char *__new;                                            \
+                size_t __len = n;                                       \
+                __new = alloca(__len);                                  \
+                (void *) memset(__new, 0, __len);                       \
+        })