summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/fetch.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-01-22 17:53:15 +0000
committerdes <des@FreeBSD.org>2003-01-22 17:53:15 +0000
commitcead81021cb94ba813d10f842c01f29ca65fd0e0 (patch)
treeb9176c4e539b1198922c2f666f43b39178a02296 /lib/libfetch/fetch.c
parenta5ab2dd958ae62591a2b7bb6677bf2125953122d (diff)
downloadFreeBSD-src-cead81021cb94ba813d10f842c01f29ca65fd0e0.zip
FreeBSD-src-cead81021cb94ba813d10f842c01f29ca65fd0e0.tar.gz
Initialization paranoia.
Diffstat (limited to 'lib/libfetch/fetch.c')
-rw-r--r--lib/libfetch/fetch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
index 394c39a..fd44ad5 100644
--- a/lib/libfetch/fetch.c
+++ b/lib/libfetch/fetch.c
@@ -77,6 +77,10 @@ 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;
+ }
if (strcasecmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchXGetFile(URL, us, flags));
else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)
@@ -131,6 +135,10 @@ 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;
+ }
if (strcasecmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchStatFile(URL, us, flags));
else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)
OpenPOWER on IntegriCloud