summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authoreric <eric@FreeBSD.org>2002-11-27 06:34:24 +0000
committereric <eric@FreeBSD.org>2002-11-27 06:34:24 +0000
commit7153bb5d5537f59dd7cad8475561353f64f08c12 (patch)
treee0ff01109bb46d7b2678b206afa23c5da395e429 /crypto
parentfbbf5407e10e167fe117a161ab5a9762a053774e (diff)
downloadFreeBSD-src-7153bb5d5537f59dd7cad8475561353f64f08c12.zip
FreeBSD-src-7153bb5d5537f59dd7cad8475561353f64f08c12.tar.gz
Merge argument parsing changes into this copy of telnet.
Submitted by: markm Approved by: bmah
Diffstat (limited to 'crypto')
-rw-r--r--crypto/telnet/telnet/commands.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/telnet/telnet/commands.c b/crypto/telnet/telnet/commands.c
index f0372a0..c450f43 100644
--- a/crypto/telnet/telnet/commands.c
+++ b/crypto/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) {
OpenPOWER on IntegriCloud