Avoid redundant declaration of missing_target()
Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
02dc534fc6
commit
e8dc37e0e3
13
http.h
13
http.h
@ -82,4 +82,17 @@ extern int active_requests;
|
||||
|
||||
extern char curl_errorstr[CURL_ERROR_SIZE];
|
||||
|
||||
static inline int missing__target(int code, int result)
|
||||
{
|
||||
return /* file:// URL -- do we ever use one??? */
|
||||
(result == CURLE_FILE_COULDNT_READ_FILE) ||
|
||||
/* http:// and https:// URL */
|
||||
(code == 404 && result == CURLE_HTTP_RETURNED_ERROR) ||
|
||||
/* ftp:// URL */
|
||||
(code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
|
||||
;
|
||||
}
|
||||
|
||||
#define missing_target(a) missing__target((a)->http_code, (a)->curl_result)
|
||||
|
||||
#endif /* HTTP_H */
|
||||
|
Reference in New Issue
Block a user