diff options
author | Eric Melville <eric@FreeBSD.org> | 2002-11-27 06:34:24 +0000 |
---|---|---|
committer | Eric Melville <eric@FreeBSD.org> | 2002-11-27 06:34:24 +0000 |
commit | 0d16d021504a2249a49b620dfd328dd21ac2324d (patch) | |
tree | e0ff01109bb46d7b2678b206afa23c5da395e429 /contrib | |
parent | 53662117cc877b14d9236740348950e87e1892ee (diff) | |
download | src-0d16d021504a2249a49b620dfd328dd21ac2324d.tar.gz src-0d16d021504a2249a49b620dfd328dd21ac2324d.zip |
Merge argument parsing changes into this copy of telnet.
Submitted by: markm
Approved by: bmah
Notes
Notes:
svn path=/head/; revision=107299
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/telnet/telnet/commands.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c index f0372a0a5856..c450f43cbc11 100644 --- a/contrib/telnet/telnet/commands.c +++ b/contrib/telnet/telnet/commands.c @@ -2284,8 +2284,12 @@ tn(int argc, char *argv[]) #endif (hostname = strrchr(hostp, ':')) == NULL) hostname = strrchr(hostp, '@'); - hostname++; - srcroute = 1; + if (hostname == NULL) { + hostname = hostp; + } else { + hostname++; + srcroute = 1; + } } else hostname = hostp; if (!portp) { |