Fix build in factory + some other fixes OBS-URL: https://build.opensuse.org/request/show/971881 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/latrace?expand=0&rev=16
23 lines
551 B
Diff
23 lines
551 B
Diff
Avoid a non-literal format string by using string token pasting.
|
|
|
|
diff --git a/src/config.h b/src/config.h
|
|
index 278771a35999a126..0346f0dcb9ccbc11 100644
|
|
--- a/src/config.h
|
|
+++ b/src/config.h
|
|
@@ -386,13 +386,11 @@ void tty_close(struct lt_config_app *cfg);
|
|
|
|
#define PRINT(fmt, args...) \
|
|
do { \
|
|
- char lpbuf[1024]; \
|
|
- sprintf(lpbuf, "[%d %s:%05d] %s", \
|
|
+ printf("[%d %s:%05d] " fmt, \
|
|
(pid_t) syscall(SYS_gettid), \
|
|
__FUNCTION__, \
|
|
__LINE__, \
|
|
- fmt); \
|
|
- printf(lpbuf, ## args); \
|
|
+ ## args); \
|
|
fflush(NULL); \
|
|
} while(0)
|
|
|