diff options
author | Mike Hommey <mh@glandium.org> | 2007-12-10 22:36:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-14 21:31:59 -0800 |
commit | e8dc37e0e30dbbed532b7471516d1ba5e6e08f27 (patch) | |
tree | f0b09d2bd8d675d0f46fdb5e704b4df54a24330c /http.h | |
parent | 02dc534fc6eb8a08c686b7cb2d979545853889d0 (diff) | |
download | git-e8dc37e0e30dbbed532b7471516d1ba5e6e08f27.tar.gz |
Avoid redundant declaration of missing_target()
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 */ |