diff options
Diffstat (limited to 'src/vpp/app/vpp_prometheus_export.c')
-rw-r--r-- | src/vpp/app/vpp_prometheus_export.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vpp/app/vpp_prometheus_export.c b/src/vpp/app/vpp_prometheus_export.c index 65e014783a0..8d09bc209a3 100644 --- a/src/vpp/app/vpp_prometheus_export.c +++ b/src/vpp/app/vpp_prometheus_export.c @@ -257,6 +257,13 @@ main (int argc, char **argv) } } + if (vec_len (patterns) == 0) + { + fformat (stderr, + "%s: usage [socket-name <name>] <patterns> ...\n", argv[0]); + exit (1); + } + rv = stat_segment_connect ((char *) stat_segment_name); if (rv) { @@ -280,7 +287,7 @@ main (int argc, char **argv) } else { - struct sockaddr_in6 clientaddr; + struct sockaddr_in6 clientaddr = { 0 }; char address[INET6_ADDRSTRLEN]; socklen_t addrlen; getpeername (conn_sock, (struct sockaddr *) &clientaddr, &addrlen); |