mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
lib/dload.c: fix opening braces to conform with coding style
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
b2fde01c54
commit
0cf05c77ad
@ -53,7 +53,8 @@ static char *get_filename(const char *url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBCURL
|
#ifdef HAVE_LIBCURL
|
||||||
static char *get_destfile(const char *path, const char *filename) {
|
static char *get_destfile(const char *path, const char *filename)
|
||||||
|
{
|
||||||
char *destfile;
|
char *destfile;
|
||||||
/* len = localpath len + filename len + null */
|
/* len = localpath len + filename len + null */
|
||||||
size_t len = strlen(path) + strlen(filename) + 1;
|
size_t len = strlen(path) + strlen(filename) + 1;
|
||||||
@ -63,7 +64,8 @@ static char *get_destfile(const char *path, const char *filename) {
|
|||||||
return(destfile);
|
return(destfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *get_tempfile(const char *path, const char *filename) {
|
static char *get_tempfile(const char *path, const char *filename)
|
||||||
|
{
|
||||||
char *tempfile;
|
char *tempfile;
|
||||||
/* len = localpath len + filename len + '.part' len + null */
|
/* len = localpath len + filename len + '.part' len + null */
|
||||||
size_t len = strlen(path) + strlen(filename) + 6;
|
size_t len = strlen(path) + strlen(filename) + 6;
|
||||||
@ -83,7 +85,8 @@ static void inthandler(int signum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int curl_progress(void *filename, double dltotal, double dlnow,
|
static int curl_progress(void *filename, double dltotal, double dlnow,
|
||||||
double ultotal, double ulnow) {
|
double ultotal, double ulnow)
|
||||||
|
{
|
||||||
|
|
||||||
/* unused parameters */
|
/* unused parameters */
|
||||||
(void)ultotal;
|
(void)ultotal;
|
||||||
@ -104,7 +107,8 @@ static int curl_progress(void *filename, double dltotal, double dlnow,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int curl_gethost(const char *url, char *buffer) {
|
static int curl_gethost(const char *url, char *buffer)
|
||||||
|
{
|
||||||
int hostlen;
|
int hostlen;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
@ -129,7 +133,8 @@ static int curl_gethost(const char *url, char *buffer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int curl_download_internal(const char *url, const char *localpath,
|
static int curl_download_internal(const char *url, const char *localpath,
|
||||||
int force) {
|
int force)
|
||||||
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
FILE *localf = NULL;
|
FILE *localf = NULL;
|
||||||
char *destfile, *filename, *tempfile;
|
char *destfile, *filename, *tempfile;
|
||||||
@ -292,7 +297,8 @@ cleanup:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int download(const char *url, const char *localpath,
|
static int download(const char *url, const char *localpath,
|
||||||
int force) {
|
int force)
|
||||||
|
{
|
||||||
if(handle->fetchcb == NULL) {
|
if(handle->fetchcb == NULL) {
|
||||||
#ifdef HAVE_LIBCURL
|
#ifdef HAVE_LIBCURL
|
||||||
return(curl_download_internal(url, localpath, force));
|
return(curl_download_internal(url, localpath, force));
|
||||||
|
Loading…
Reference in New Issue
Block a user