From e8f612b68750f8015ea0fd1a9511db4967d7a0c7 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Wed, 17 Dec 2008 18:00:18 +0000 Subject: 1. Update fetch to consistently return 1 on error, as the man page states, rather than usually returning 1 but in a few instances using a sysexits(3) return value. 2. Remove a few unused variables from libfetch. PR: docs/122470 (1, only) Reviewed by: des --- lib/libfetch/fetch.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/libfetch') diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 6c4901f64d96..5044fe301bc6 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -74,9 +74,7 @@ static struct fetcherr url_errlist[] = { 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 @@ fetchGet(struct url *URL, const char *flags) 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 @@ fetchPut(struct url *URL, const char *flags) 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 @@ fetchStat(struct url *URL, struct url_stat *us, const char *flags) 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) -- cgit v1.3