lib/download.c: xbps_fetch_file: remove unnecesary memset() calls.
This commit is contained in:
parent
febc673f1e
commit
74970f2e92
@ -115,7 +115,6 @@ xbps_fetch_file(struct xbps_handle *xhp, const char *uri, const char *flags)
|
|||||||
if ((url = fetchParseURL(uri)) == NULL)
|
if ((url = fetchParseURL(uri)) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
memset(&fetch_flags, 0, sizeof(fetch_flags));
|
|
||||||
if (flags != NULL)
|
if (flags != NULL)
|
||||||
strlcpy(fetch_flags, flags, 7);
|
strlcpy(fetch_flags, flags, 7);
|
||||||
/*
|
/*
|
||||||
@ -131,7 +130,6 @@ xbps_fetch_file(struct xbps_handle *xhp, const char *uri, const char *flags)
|
|||||||
/*
|
/*
|
||||||
* Check if we have to resume a transfer.
|
* Check if we have to resume a transfer.
|
||||||
*/
|
*/
|
||||||
memset(&st_tmpfile, 0, sizeof(st_tmpfile));
|
|
||||||
if (stat(tempfile, &st_tmpfile) == 0) {
|
if (stat(tempfile, &st_tmpfile) == 0) {
|
||||||
if (st_tmpfile.st_size > 0)
|
if (st_tmpfile.st_size > 0)
|
||||||
restart = true;
|
restart = true;
|
||||||
@ -144,7 +142,6 @@ xbps_fetch_file(struct xbps_handle *xhp, const char *uri, const char *flags)
|
|||||||
/*
|
/*
|
||||||
* Check if we have to refetch a transfer.
|
* Check if we have to refetch a transfer.
|
||||||
*/
|
*/
|
||||||
memset(&st, 0, sizeof(st));
|
|
||||||
if (stat(filename, &st) == 0) {
|
if (stat(filename, &st) == 0) {
|
||||||
refetch = true;
|
refetch = true;
|
||||||
url->last_modified = st.st_mtime;
|
url->last_modified = st.st_mtime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user