aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/sock_test_client.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-04-06 09:18:11 -0700
committerNeale Ranns <nranns@cisco.com>2018-04-12 06:53:38 -0400
commit756cd9441752fc8f84104c9ee19099506ba89f85 (patch)
treeda9afcf137e7cb540713d39a3c5df2b0fdd8ead2 /src/vcl/sock_test_client.c
parent58c711a196d9b178bfe6190964a7df92145cf949 (diff)
Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'
Change-Id: I994649761fe2e66e12ae0e49a84fb1d0a966ddfb Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vcl/sock_test_client.c')
-rw-r--r--src/vcl/sock_test_client.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vcl/sock_test_client.c b/src/vcl/sock_test_client.c
index 3559c68562f..1ed4b89a3b1 100644
--- a/src/vcl/sock_test_client.c
+++ b/src/vcl/sock_test_client.c
@@ -794,16 +794,20 @@ parse_input ()
sock_test_socket_t *ctrl = &scm->ctrl_socket;
sock_test_t rv = SOCK_TEST_TYPE_NONE;
- if (!strcmp (SOCK_TEST_TOKEN_EXIT, ctrl->txbuf))
+ if (!strncmp (SOCK_TEST_TOKEN_EXIT, ctrl->txbuf,
+ strlen (SOCK_TEST_TOKEN_EXIT)))
rv = SOCK_TEST_TYPE_EXIT;
- else if (!strcmp (SOCK_TEST_TOKEN_HELP, ctrl->txbuf))
+ else if (!strncmp (SOCK_TEST_TOKEN_HELP, ctrl->txbuf,
+ strlen (SOCK_TEST_TOKEN_HELP)))
dump_help ();
- else if (!strcmp (SOCK_TEST_TOKEN_SHOW_CFG, ctrl->txbuf))
+ else if (!strncmp (SOCK_TEST_TOKEN_SHOW_CFG, ctrl->txbuf,
+ strlen (SOCK_TEST_TOKEN_SHOW_CFG)))
scm->dump_cfg = 1;
- else if (!strcmp (SOCK_TEST_TOKEN_VERBOSE, ctrl->txbuf))
+ else if (!strncmp (SOCK_TEST_TOKEN_VERBOSE, ctrl->txbuf,
+ strlen (SOCK_TEST_TOKEN_VERBOSE)))
cfg_verbose_toggle ();
else if (!strncmp (SOCK_TEST_TOKEN_TXBUF_SIZE, ctrl->txbuf,