http.c: remove new-line from error() calls
one new-line is always appended to the message by the error function.
This commit is contained in:
parent
c1a7c9671d
commit
8cf883eb29
1 changed files with 3 additions and 3 deletions
6
http.c
6
http.c
|
|
@ -99,7 +99,7 @@ static size_t write_cb(void *src, size_t smemb, size_t nmemb, void *data) {
|
||||||
|
|
||||||
dest->block = realloc(dest->block, dest->len + size);
|
dest->block = realloc(dest->block, dest->len + size);
|
||||||
if (dest->block == NULL) {
|
if (dest->block == NULL) {
|
||||||
error("out of memory\n");
|
error("out of memory");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy(dest->block + dest->len, src, size);
|
memcpy(dest->block + dest->len, src, size);
|
||||||
|
|
@ -138,7 +138,7 @@ struct http_data* http_fetch_page(const char *url) {
|
||||||
res = curl_easy_perform(handle);
|
res = curl_easy_perform(handle);
|
||||||
|
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
error("curl: (%s) %s\n", url, curl_easy_strerror(res));
|
error("curl: (%s) %s", url, curl_easy_strerror(res));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,7 +178,7 @@ int http_download_file(const char *url, const char *dir) {
|
||||||
res = curl_easy_perform(handle);
|
res = curl_easy_perform(handle);
|
||||||
|
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
error("curl: (%s) %s\n", url, curl_easy_strerror(res));
|
error("curl: (%s) %s", url, curl_easy_strerror(res));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue