summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-07-08 15:17:26 +0000
committerdes <des@FreeBSD.org>2001-07-08 15:17:26 +0000
commitedbf7599a6a4d95c2a3c4e5ee631a2f73b7e763b (patch)
tree94b934db59685cdf98f3b2280a60f7a37c2c4fdf /usr.bin/fetch
parenta8f21f2114383b145fedd19fabc6aae8e2e282d7 (diff)
downloadFreeBSD-src-edbf7599a6a4d95c2a3c4e5ee631a2f73b7e763b.zip
FreeBSD-src-edbf7599a6a4d95c2a3c4e5ee631a2f73b7e763b.tar.gz
Fix an embarassing if-test-reversal bug that broke scheme guessing.
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index d05b483..a63f04e 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -246,9 +246,9 @@ fetch(char *URL, char *path)
if (!*url->scheme) {
if (!*url->host)
strcpy(url->scheme, SCHEME_FILE);
- else if (strncasecmp(url->host, "ftp.", 4))
+ else if (strncasecmp(url->host, "ftp.", 4) == 0)
strcpy(url->scheme, SCHEME_FTP);
- else if (strncasecmp(url->host, "www.", 4))
+ else if (strncasecmp(url->host, "www.", 4) == 0)
strcpy(url->scheme, SCHEME_HTTP);
}
OpenPOWER on IntegriCloud