X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvcl_test.h;h=68750af89a14a956c94a4040c50efbbc5b93ce0b;hb=0e88e851e058f4fb7cc690dbbdb19216ab360d1c;hp=83e63e1a4e722c30b9ad29ad8bac4469959eb553;hpb=008dbe109ce2714be69ffb6549a0c0198a07f7d0;p=vpp.git diff --git a/src/vcl/vcl_test.h b/src/vcl/vcl_test.h index 83e63e1a4e7..68750af89a1 100644 --- a/src/vcl/vcl_test.h +++ b/src/vcl/vcl_test.h @@ -125,9 +125,7 @@ static inline int vcl_test_write (int fd, uint8_t *buf, uint32_t nbytes, sock_test_stats_t *stats, uint32_t verbose) { - int tx_bytes = 0; - int nbytes_left = nbytes; - int rv, errno_val; + int tx_bytes = 0, nbytes_left = nbytes, rv; do { @@ -163,10 +161,7 @@ vcl_test_write (int fd, uint8_t *buf, uint32_t nbytes, if (tx_bytes < 0) { - errno_val = errno; - perror ("ERROR in sock_test_write()"); - fprintf (stderr, "SOCK_TEST: ERROR: socket write failed " - "(errno = %d)!\n", errno_val); + vterr ("vpcom_session_write", -errno); } else if (stats) stats->tx_bytes += tx_bytes;