summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-02-28 18:37:07 +0000
committershin <shin@FreeBSD.org>2000-02-28 18:37:07 +0000
commit0f87228bd084f0a4c8e3890e4a50c5811119d056 (patch)
tree34261946969dd1bb053423049a5e1ade844a5daa /usr.bin/ftp
parente52757e9dd40fad69d76303ca929f34458ad55ec (diff)
downloadFreeBSD-src-0f87228bd084f0a4c8e3890e4a50c5811119d056.zip
FreeBSD-src-0f87228bd084f0a4c8e3890e4a50c5811119d056.tar.gz
Previous fix was incomplete and has problem in reverse lookup failed dest,
so fix it. Approved by: jkh Submitted by: Ian West <ian@niw.com.au>
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/ftp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c
index d374fdd..6e0e7d2 100644
--- a/usr.bin/ftp/ftp.c
+++ b/usr.bin/ftp/ftp.c
@@ -134,11 +134,10 @@ hookup(host0, port)
}
res = res0;
- if (res->ai_canonname) {
+ if (res->ai_canonname)
(void) strncpy(hostnamebuf, res->ai_canonname,
sizeof(hostnamebuf));
- hostname = hostnamebuf;
- }
+ hostname = hostnamebuf;
while (1) {
s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (s < 0) {
OpenPOWER on IntegriCloud