]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: Drop memory-util.h include from stdio-util.h
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 12 Aug 2022 11:54:49 +0000 (13:54 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 8 Jan 2023 15:31:15 +0000 (16:31 +0100)
We want to include stdio-util.h in log.h in a future commit. To avoid
circular includes, we need to drop the memory-util.h include from
stdio-util.h

src/basic/stdio-util.h

index a29170e20362d5a716e6ffada92ab1c984b5359a..4e93ac90c9ab0d258740c1c0e9db8b379b4f8399 100644 (file)
@@ -7,7 +7,6 @@
 #include <sys/types.h>
 
 #include "macro.h"
-#include "memory-util.h"
 
 _printf_(3, 4)
 static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) {
@@ -32,7 +31,7 @@ do {                                                                    \
         size_t _i, _k;                                                  \
         /* See https://github.com/google/sanitizers/issues/992 */       \
         if (HAS_FEATURE_MEMORY_SANITIZER)                               \
-                zero(_argtypes);                                        \
+                memset(_argtypes, 0, sizeof(_argtypes));                \
         _k = parse_printf_format((format), ELEMENTSOF(_argtypes), _argtypes); \
         assert(_k < ELEMENTSOF(_argtypes));                             \
         for (_i = 0; _i < _k; _i++) {                                   \