do not call clnt_spcreateerror nor clnt_sperror with a NULL pointer, instead

pass an empty string.

Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
This commit is contained in:
Alfred Perlstein 2002-07-15 18:53:52 +00:00
parent af37179b5f
commit 5a9d606d4b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100121

View File

@ -123,7 +123,7 @@ main(int argc, char *argv[])
/* create connection with server */
cl = clnt_create(*argv, SPRAYPROG, SPRAYVERS, "udp");
if (cl == NULL)
errx(1, "%s", clnt_spcreateerror(NULL));
errx(1, "%s", clnt_spcreateerror(""));
/*
@ -139,7 +139,7 @@ main(int argc, char *argv[])
/* Clear server statistics */
if (clnt_call(cl, SPRAYPROC_CLEAR, (xdrproc_t)xdr_void, NULL,
(xdrproc_t)xdr_void, NULL, TIMEOUT) != RPC_SUCCESS)
errx(1, "%s", clnt_sperror(cl, NULL));
errx(1, "%s", clnt_sperror(cl, ""));
/* Spray server with packets */
@ -160,7 +160,7 @@ main(int argc, char *argv[])
/* Collect statistics from server */
if (clnt_call(cl, SPRAYPROC_GET, (xdrproc_t)xdr_void, NULL,
(xdrproc_t)xdr_spraycumul, &host_stats, TIMEOUT) != RPC_SUCCESS)
errx(1, "%s", clnt_sperror(cl, NULL));
errx(1, "%s", clnt_sperror(cl, ""));
xmit_time = host_stats.clock.sec +
(host_stats.clock.usec / 1000000.0);