summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorAndreas Schultz <andreas.schultz@travelping.com>2020-05-15 11:50:07 +0200
committerIvan Shvedunov <ivan4th@gmail.com>2022-07-06 03:32:18 +0400
commit972dc17634e430cb93b97c67b50096acc3164231 (patch)
tree2a091bf4b3a16b7c750dda72f268052141ff6dbe /src/vnet
parentf8631ce7e8886136b4543a7926ffdf1bc760fb11 (diff)
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 <ivan4th@gmail.com> Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: I37d975eef5a1ad98fbfb65ebe47d73458aafea00
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/application.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 7f88c7a5ff0..67dc7d633ec 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -1681,7 +1681,7 @@ application_format_listeners (application_t * app, int verbose)
if (!app)
{
- vlib_cli_output (vm, "%U", format_app_worker_listener, 0 /* header */ ,
+ vlib_cli_output (vm, "%U", format_app_worker_listener, NULL /* header */,
0, 0, verbose);
return;
}