summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2010-07-09 12:27:10 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2010-07-09 12:27:10 +0000
commit59258b12c31f174f281f0fc990c5f38ad2e98c92 (patch)
treeb35518180e2ee0e09ee5e73f7c55b242d1771a99 /usr.sbin
parentbea43303f62eb986c37c0ecb74e87afb77125a74 (diff)
inetname is only called when !nflag. There is no need to again check for
!nflag within inetname(). from Alexandr Shadchin ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/traceroute/traceroute.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index 1c3771fa230..62a7ed727cc 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.71 2010/07/08 20:23:03 claudio Exp $ */
+/* $OpenBSD: traceroute.c,v 1.72 2010/07/09 12:27:09 dhill Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*-
@@ -1129,8 +1129,6 @@ in_cksum(u_short *addr, int len)
/*
* Construct an Internet address representation.
- * If the nflag has been supplied, give
- * numeric value, otherwise try for symbolic name.
*/
char *
inetname(struct in_addr in)
@@ -1140,14 +1138,14 @@ inetname(struct in_addr in)
struct hostent *hp;
char *cp;
- if (first && !nflag) {
+ if (first) {
first = 0;
if (gethostname(domain, sizeof domain) == 0 &&
(cp = strchr(domain, '.')) != NULL) {
strlcpy(domain, cp + 1, sizeof(domain));
}
}
- if (!nflag && in.s_addr != INADDR_ANY) {
+ if (in.s_addr != INADDR_ANY) {
hp = gethostbyaddr((char *)&in, sizeof(in), AF_INET);
if (hp != NULL) {
if ((cp = strchr(hp->h_name, '.')) != NULL &&