Date: Tue, 27 Apr 2010 13:34:51 GMT From: pluknet <pluknet@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/146088: [patch] netrate/tcpconnect incorrectly uses err() Message-ID: <201004271334.o3RDYpFt060496@www.freebsd.org> Resent-Message-ID: <201004271340.o3RDe1jX058606@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 146088 >Category: misc >Synopsis: [patch] netrate/tcpconnect incorrectly uses err() >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 27 13:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: pluknet >Release: HEAD r207204 >Organization: >Environment: FreeBSD 9.0-CURRENT #10: Mon Apr 26 22:06:30 UTC 2010 >Description: In netrate/tcpconnect usage() calls err() if no arguments given (with always errno=0). That produces dirty error message: tcpconnect: usage: tcpconnect [ip]: Unknown error: 0 >How-To-Repeat: >Fix: Patch attached with submission follows: Index: tools/tools/netrate/tcpconnect/tcpconnect.c =================================================================== --- tools/tools/netrate/tcpconnect/tcpconnect.c (revision 207204) +++ tools/tools/netrate/tcpconnect/tcpconnect.c (working copy) @@ -110,7 +110,7 @@ u_int64_t counter; if (argc != 2) - err(-1, "usage: tcpconnect [ip]"); + errx(-1, "usage: tcpconnect [ip]"); bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004271334.o3RDYpFt060496>
