libalpm: set errno when setting parallel downloads with an invalid number
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
75cfce9468
commit
66f9f315cf
1 changed files with 1 additions and 3 deletions
|
@ -857,9 +857,7 @@ int SYMEXPORT alpm_option_set_parallel_downloads(alpm_handle_t *handle,
|
|||
{
|
||||
CHECK_HANDLE(handle, return -1);
|
||||
#ifdef HAVE_LIBCURL
|
||||
if(num_streams < 1) {
|
||||
return -1;
|
||||
}
|
||||
ASSERT(num_streams >= 1, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
|
||||
handle->parallel_downloads = num_streams;
|
||||
#else
|
||||
(void)num_streams; /* silence unused variable warnings */
|
||||
|
|
Loading…
Add table
Reference in a new issue