summaryrefslogtreecommitdiffstats
path: root/src/uri
diff options
context:
space:
mode:
Diffstat (limited to 'src/uri')
-rw-r--r--src/uri/sock_test_client.c1
-rw-r--r--src/uri/uri_socket_test.c24
-rw-r--r--src/uri/vppcom.c8
3 files changed, 29 insertions, 4 deletions
diff --git a/src/uri/sock_test_client.c b/src/uri/sock_test_client.c
index ab8e5a0e4a7..151c90b2960 100644
--- a/src/uri/sock_test_client.c
+++ b/src/uri/sock_test_client.c
@@ -429,6 +429,7 @@ exit_client (void)
tsock = &scm->test_socket[i];
tsock->cfg.test = SOCK_TEST_TYPE_EXIT;
+ /* coverity[COPY_PASTE_ERROR] */
if (ctrl->cfg.verbose)
{
printf ("\nCLIENT (fd %d): Sending exit cfg to server...\n",
diff --git a/src/uri/uri_socket_test.c b/src/uri/uri_socket_test.c
index 5f7084d5b20..4469b03d4c2 100644
--- a/src/uri/uri_socket_test.c
+++ b/src/uri/uri_socket_test.c
@@ -36,8 +36,6 @@ main (int argc, char *argv[])
if (argc >= 3)
{
- bytes = ((long) atoi (argv[4])) << 20;
- no_echo = atoi (argv[3]);
portno = atoi (argv[2]);
server = gethostbyname (argv[1]);
if (server == NULL)
@@ -45,6 +43,28 @@ main (int argc, char *argv[])
clib_unix_warning ("gethostbyname");
exit (1);
}
+
+ argc -= 3;
+ argv += 3;
+
+ if (argc)
+ {
+ bytes = ((long) atoi (argv[0])) << 20;
+ argc--;
+ argv++;
+ }
+ if (argc)
+ {
+ no_echo = atoi (argv[0]);
+ argc--;
+ argv++;
+ }
+ if (argc)
+ {
+ test_bytes = atoi (argv[0]);
+ argc--;
+ argv++;
+ }
}
else
{
diff --git a/src/uri/vppcom.c b/src/uri/vppcom.c
index 8a8a806caf0..c7ae0ea5eff 100644
--- a/src/uri/vppcom.c
+++ b/src/uri/vppcom.c
@@ -1478,7 +1478,7 @@ vppcom_cfg_read (char *conf_fname)
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
- unformat_user (input, unformat_line_input, line_input);
+ (void) unformat_user (input, unformat_line_input, line_input);
unformat_skip_white_space (line_input);
if (unformat (line_input, "vppcom {"))
@@ -2359,12 +2359,14 @@ vppcom_select (unsigned long n_bits, unsigned long *read_map,
clib_bitmap_get (vcm->ex_bitmap, session_index) && (rv < 0))
{
// TBD: clib_warning
+ /* coverity[FORWARD_NULL] */
clib_bitmap_set_no_check (except_map, session_index, 1);
bits_set++;
}
else if (rv > 0)
{
// TBD: clib_warning
+ /* coverity[FORWARD_NULL] */
clib_bitmap_set_no_check (read_map, session_index, 1);
bits_set++;
}
@@ -2387,9 +2389,10 @@ vppcom_select (unsigned long n_bits, unsigned long *read_map,
rv = vppcom_session_write_ready (session, session_index);
clib_spinlock_unlock (&vcm->sessions_lockp);
- if (rv > 0)
+ if (rv > 0 )
{
// TBD: clib_warning
+ /* coverity[FORWARD_NULL] */
clib_bitmap_set_no_check (write_map, session_index, 1);
bits_set++;
}
@@ -2415,6 +2418,7 @@ vppcom_select (unsigned long n_bits, unsigned long *read_map,
if (rv < 0)
{
// TBD: clib_warning
+ /* coverity[FORWARD_NULL] */
clib_bitmap_set_no_check (except_map, session_index, 1);
bits_set++;
}