summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2008-12-17 18:00:18 +0000
committermurray <murray@FreeBSD.org>2008-12-17 18:00:18 +0000
commita12379d1b7dab02e52f76828c2fb9c4aceac3ab1 (patch)
tree5043fc0d16f6e2fa255dedd37df7b9141c971cf7 /lib
parentd654ea043b3abb2b97f8ec55e264e3ec987b3d09 (diff)
downloadFreeBSD-src-a12379d1b7dab02e52f76828c2fb9c4aceac3ab1.zip
FreeBSD-src-a12379d1b7dab02e52f76828c2fb9c4aceac3ab1.tar.gz
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 > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M usr.bin/fetch/fetch.c M lib/libfetch/fetch.c
Diffstat (limited to 'lib')
-rw-r--r--lib/libfetch/fetch.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
index 6c4901f..5044fe3 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)
OpenPOWER on IntegriCloud