vcl: fix sock client and server tests 37/20437/3
authorFlorin Coras <fcoras@cisco.com>
Mon, 1 Jul 2019 15:29:39 +0000 (08:29 -0700)
committerDave Barach <openvpp@barachs.net>
Tue, 2 Jul 2019 11:52:29 +0000 (11:52 +0000)
Type:fix

Reported by coverity.

Change-Id: Ie623c5aa3ef54b649039c5ffa10476373c532825
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/plugins/hs_apps/vcl/sock_test_client.c
src/plugins/hs_apps/vcl/sock_test_server.c

index ea89987..569fd07 100644 (file)
@@ -211,8 +211,8 @@ echo_test_client ()
                                nbytes, &tsock->stats);
              if (rx_bytes > 0)
                {
-                 printf ("CLIENT (fd %d): RX (%d bytes) - '%s'\n",
-                         tsock->fd, rx_bytes, tsock->rxbuf);
+                 printf ("CLIENT (fd %d): RX (%d bytes)\n", tsock->fd,
+                         rx_bytes);
 
                  if (tsock->stats.rx_bytes != tsock->stats.tx_bytes)
                    printf ("CLIENT: WARNING: bytes read (%lu) "
index 59dae17..0714ccc 100644 (file)
@@ -339,9 +339,8 @@ af_unix_echo (void)
       errno_val = errno;
       perror ("ERROR in af_unix_echo(): read() failed");
       fprintf (stderr, "SERVER: ERROR: read(af_unix_client_fd %d (0x%x), "
-              "\"%s\", nbytes %lu) failed (errno = %d)!\n",
-              af_unix_client_fd, af_unix_client_fd, buffer, nbytes,
-              errno_val);
+              "nbytes %lu) failed (errno = %d)!\n", af_unix_client_fd,
+              af_unix_client_fd, nbytes, errno_val);
       goto done;
     }