Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
http.c: use error_errno() and warning_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:48 +0000
(16:47 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000
(12:29 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7645d8f
)
diff --git
a/http.c
b/http.c
index 69da4454d8f754598d0316d0e1cb34870aba2b8e..fa39b879cecbe3402075600ce9edfbee08eee986 100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-446,8
+446,7
@@
static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type)
rc = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&ka, len);
if (rc < 0)
rc = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&ka, len);
if (rc < 0)
- warning("unable to set SO_KEEPALIVE on socket %s",
- strerror(errno));
+ warning_errno("unable to set SO_KEEPALIVE on socket");
return 0; /* CURL_SOCKOPT_OK only exists since curl 7.21.5 */
}
return 0; /* CURL_SOCKOPT_OK only exists since curl 7.21.5 */
}
@@
-1891,8
+1890,7
@@
struct http_object_request *new_http_object_request(const char *base_url,
}
if (freq->localfile < 0) {
}
if (freq->localfile < 0) {
- error("Couldn't create temporary file %s: %s",
- freq->tmpfile, strerror(errno));
+ error_errno("Couldn't create temporary file %s", freq->tmpfile);
goto abort;
}
goto abort;
}
@@
-1937,8
+1935,8
@@
struct http_object_request *new_http_object_request(const char *base_url,
prev_posn = 0;
lseek(freq->localfile, 0, SEEK_SET);
if (ftruncate(freq->localfile, 0) < 0) {
prev_posn = 0;
lseek(freq->localfile, 0, SEEK_SET);
if (ftruncate(freq->localfile, 0) < 0) {
- error
("Couldn't truncate temporary file %s:
%s",
-
freq->tmpfile, strerror(errno)
);
+ error
_errno("Couldn't truncate temporary file
%s",
+
freq->tmpfile
);
goto abort;
}
}
goto abort;
}
}