File latrace-PRINT-format.patch of Package latrace

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)
 
openSUSE Build Service is sponsored by