From 972dc17634e430cb93b97c67b50096acc3164231 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Fri, 15 May 2020 11:50:07 +0200 Subject: misc: pass NULL instead of 0 for pointer in variadic functions 0 is not NULL (at least not in all cases), passing 0 into a variadic function in a place where the consumer reads it as pointer might leave parts of the pointer uninitilized and hence filled with random data. It seems that this used to work with gcc, but clang seems to treat the 0 in those places as a 32bit integer. Type: fix Signed-off-by: Ivan Shvedunov Signed-off-by: Andreas Schultz Change-Id: I37d975eef5a1ad98fbfb65ebe47d73458aafea00 --- src/plugins/mactime/mactime_top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/mactime') diff --git a/src/plugins/mactime/mactime_top.c b/src/plugins/mactime/mactime_top.c index abcb530608c..d7223f45e56 100644 --- a/src/plugins/mactime/mactime_top.c +++ b/src/plugins/mactime/mactime_top.c @@ -441,7 +441,7 @@ print_device_table (mt_main_t * mm) { mactime_device_t *dev; - fformat (stdout, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); + fformat (stdout, "%U", format_device, NULL /* header */, 0 /* verbose */); /* *INDENT-OFF* */ pool_foreach (dev, mm->devices) { -- cgit 1.2.3-korg