diff options
-rw-r--r-- | usr.sbin/spray/spray.8 | 6 | ||||
-rw-r--r-- | usr.sbin/spray/spray.c | 22 |
2 files changed, 13 insertions, 15 deletions
diff --git a/usr.sbin/spray/spray.8 b/usr.sbin/spray/spray.8 index a29bb59..d57abd9 100644 --- a/usr.sbin/spray/spray.8 +++ b/usr.sbin/spray/spray.8 @@ -33,8 +33,6 @@ .Op Fl d Ar delay .Op Fl l Ar length .Ar host -\&... -.Ek .Sh DESCRIPTION .Nm Spray sends multiple RPC packets to @@ -65,9 +63,7 @@ rounds up to the nearest possible value. .Nm Spray is intended for use in network testing, measurement, and management. This command -.Bf -emphasis -can be very hard on a network and should be used with caution. -.Ef +.Em "can be very hard on a network and should be used with caution" . .Pp .Sh SEE ALSO .Xr netstat 1 , diff --git a/usr.sbin/spray/spray.c b/usr.sbin/spray/spray.c index 15817c7..d6f53f1 100644 --- a/usr.sbin/spray/spray.c +++ b/usr.sbin/spray/spray.c @@ -26,10 +26,13 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -41,7 +44,7 @@ #define SPRAYOVERHEAD 86 #endif -void usage (); +static void usage (); void print_xferstats (); /* spray buffer */ @@ -57,7 +60,6 @@ main(argc, argv) int argc; char **argv; { - char *progname; spraycumul host_stats; sprayarr host_array; CLIENT *cl; @@ -68,7 +70,6 @@ main(argc, argv) int length = 0; double xmit_time; /* time to receive data */ - progname = *argv; while ((c = getopt(argc, argv, "c:d:l:")) != -1) { switch (c) { case 'c': @@ -123,7 +124,7 @@ main(argc, argv) /* create connection with server */ cl = clnt_create(*argv, SPRAYPROG, SPRAYVERS, "udp"); if (cl == NULL) { - clnt_pcreateerror(progname); + clnt_pcreateerror("spray"); exit(1); } @@ -140,7 +141,7 @@ main(argc, argv) /* Clear server statistics */ if (clnt_call(cl, SPRAYPROC_CLEAR, xdr_void, NULL, xdr_void, NULL, TIMEOUT) != RPC_SUCCESS) { - clnt_perror(cl, progname); + clnt_perror(cl, "spray"); exit(1); } @@ -160,7 +161,7 @@ main(argc, argv) /* Collect statistics from server */ if (clnt_call(cl, SPRAYPROC_GET, xdr_void, NULL, xdr_spraycumul, &host_stats, TIMEOUT) != RPC_SUCCESS) { - clnt_perror(cl, progname); + clnt_perror(cl, "spray"); exit(1); } @@ -216,9 +217,10 @@ print_xferstats(packets, packetlen, xfertime) } -void +static void usage () { - fprintf(stderr, "usage: spray [-c count] [-l length] [-d delay] host\n"); + fprintf(stderr, + "usage: spray [-c count] [-l length] [-d delay] host\n"); exit(1); } |