summaryrefslogtreecommitdiff
path: root/src/transports
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
commit3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e (patch)
tree1774677db7e5f0e33c3ab3967d64e2c95a631a5e /src/transports
parentb02bcd97f80beabc96cd1f861bfc3b5f7532ef8b (diff)
downloadlibgit2-3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e.tar.gz
Remove old and unused error codes
Diffstat (limited to 'src/transports')
-rw-r--r--src/transports/git.c2
-rw-r--r--src/transports/http.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/transports/git.c b/src/transports/git.c
index 31bc21c9..c51b1670 100644
--- a/src/transports/git.c
+++ b/src/transports/git.c
@@ -72,7 +72,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url)
git_buf_putc(request, '\0');
if (git_buf_oom(request))
- return GIT_ENOMEM;
+ return -1;
return 0;
}
diff --git a/src/transports/http.c b/src/transports/http.c
index 3690f3de..1b2b5eb8 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -78,7 +78,7 @@ static int gen_request(git_buf *buf, const char *url, const char *host, const ch
git_buf_puts(buf, "\r\n");
if (git_buf_oom(buf))
- return GIT_ENOMEM;
+ return -1;
return 0;
}
@@ -174,13 +174,13 @@ static int on_headers_complete(http_parser *parser)
if (t->content_type == NULL) {
t->content_type = git__strdup(git_buf_cstr(buf));
if (t->content_type == NULL)
- return t->error = GIT_ENOMEM;
+ return t->error = -1;
}
git_buf_clear(buf);
git_buf_printf(buf, "application/x-git-%s-advertisement", t->service);
if (git_buf_oom(buf))
- return t->error = GIT_ENOMEM;
+ return t->error = -1;
if (strcmp(t->content_type, git_buf_cstr(buf)))
return t->error = -1;