Index: usr.bin/fetch/fetch.c =================================================================== --- usr.bin/fetch/fetch.c (revision 186202) +++ usr.bin/fetch/fetch.c (working copy) @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -865,7 +864,7 @@ break; default: usage(); - exit(EX_USAGE); + exit(1); } argc -= optind; @@ -874,7 +873,7 @@ if (h_hostname || f_filename || c_dirname) { if (!h_hostname || !f_filename || argc) { usage(); - exit(EX_USAGE); + exit(1); } /* XXX this is a hack. */ if (strcspn(h_hostname, "@:/") != strlen(h_hostname)) @@ -887,7 +886,7 @@ if (!argc) { usage(); - exit(EX_USAGE); + exit(1); } /* allocate buffer */ @@ -928,10 +927,10 @@ } else if (stat(o_filename, &sb) == -1) { if (errno == ENOENT) { if (argc > 1) - errx(EX_USAGE, "%s is not a directory", + errx(1, "%s is not a directory", o_filename); } else { - err(EX_IOERR, "%s", o_filename); + err(1, "%s", o_filename); } } else { if (sb.st_mode & S_IFDIR) Index: lib/libfetch/fetch.c =================================================================== --- lib/libfetch/fetch.c (revision 186202) +++ lib/libfetch/fetch.c (working copy) @@ -74,9 +74,7 @@ FILE * fetchXGet(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -110,9 +108,7 @@ FILE * fetchPut(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchPutFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) @@ -132,9 +128,7 @@ int fetchStat(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -158,9 +152,7 @@ struct url_ent * fetchList(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchListFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)