Factorize fetch error check by testing size after the fetch loop
modified libpkg/fetch.c
@@ -335,11 +335,8 @@ pkg_fetch_file_to_fd(struct pkg_fetch *f, const char *url, int dest, time_t *t)
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -362,6 +359,12 @@ pkg_fetch_file_to_fd(struct pkg_fetch *f, const char *url, int dest, time_t *t)
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|