diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-04-28 09:59:36 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-04-28 13:33:17 +0200 |
commit | 39a8ef05cdbb44758752bbe491b895672ce0e811 (patch) | |
tree | 7fb08b179b22208379aeef47df39f1fa45c0b1c1 /src/basic/stdio-util.h | |
parent | hwdb: Add a common Logitech M185/M225 mouse variant (diff) | |
download | systemd-39a8ef05cdbb44758752bbe491b895672ce0e811.tar.xz systemd-39a8ef05cdbb44758752bbe491b895672ce0e811.zip |
various: drop unnecessary DISABLE_WARNING_FORMAT_NONLITERAL
We use _printf_ for these functions, so there shouldn't
be a warning in the first place.
Diffstat (limited to 'src/basic/stdio-util.h')
-rw-r--r-- | src/basic/stdio-util.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h index 4e93ac90c9..0a2239d022 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -9,14 +9,12 @@ #include "macro.h" _printf_(3, 4) -static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) { +static inline char* snprintf_ok(char *buf, size_t len, const char *format, ...) { va_list ap; int r; va_start(ap, format); - DISABLE_WARNING_FORMAT_NONLITERAL; r = vsnprintf(buf, len, format, ap); - REENABLE_WARNING; va_end(ap); return r >= 0 && (size_t) r < len ? buf : NULL; |