Don't try convert "-" to numeric form for -n option

This commit is contained in:
Andrey A. Chernov 1996-06-17 18:35:16 +00:00
parent 808aa7aa51
commit 0fd06e5d7c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16443

View File

@ -323,7 +323,7 @@ main(argc, argv)
}
p = hp->h_name;
}
if (nflag && inet_addr(p) == INADDR_NONE) {
if (nflag && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) {
hp = gethostbyname(p);
if (hp != NULL) {