Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-18 03:21:06 +0400
committerVicent Martí <tanoku@gmail.com>2012-05-18 03:26:26 +0400
commite172cf082e62aa421703080d0bccb7b8762c8bd4 (patch)
treec19f7b1be056a9176d4e865f5be5c69a5c2912c6 /src/pack.c
parent2e2e97858de18abd43f7e59fcc6151510c6d3272 (diff)
errors: Rename the generic return codes
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pack.c b/src/pack.c
index 4a6bc6ae8..66a23f295 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -28,7 +28,7 @@ int packfile_unpack_compressed(
/* Can find the offset of an object given
* a prefix of an identifier.
- * Throws GIT_EAMBIGUOUSOIDPREFIX if short oid
+ * Throws GIT_AMBIGUOUSOIDPREFIX if short oid
* is ambiguous within the pack.
* This method assumes that len is between
* GIT_OID_MINPREFIXLEN and GIT_OID_HEXSZ.
@@ -222,7 +222,7 @@ static int packfile_unpack_header1(
shift = 4;
while (c & 0x80) {
if (len <= used)
- return GIT_ESHORTBUFFER;
+ return GIT_SHORTBUFFER;
if (bitsizeof(long) <= shift) {
*usedp = 0;
@@ -260,11 +260,11 @@ int git_packfile_unpack_header(
// base = pack_window_open(p, w_curs, *curpos, &left);
base = git_mwindow_open(mwf, w_curs, *curpos, 20, &left);
if (base == NULL)
- return GIT_ESHORTBUFFER;
+ return GIT_SHORTBUFFER;
ret = packfile_unpack_header1(&used, size_p, type_p, base, left);
git_mwindow_close(w_curs);
- if (ret == GIT_ESHORTBUFFER)
+ if (ret == GIT_SHORTBUFFER)
return ret;
else if (ret < 0)
return packfile_error("header length is zero");
@@ -428,7 +428,7 @@ int packfile_unpack_compressed(
if (st == Z_BUF_ERROR && in == NULL) {
inflateEnd(&stream);
git__free(buffer);
- return GIT_ESHORTBUFFER;
+ return GIT_SHORTBUFFER;
}
*curpos += stream.next_in - in;
@@ -467,7 +467,7 @@ git_off_t get_delta_base(
base_info = pack_window_open(p, w_curs, *curpos, &left);
/* Assumption: the only reason this would fail is because the file is too small */
if (base_info == NULL)
- return GIT_ESHORTBUFFER;
+ return GIT_SHORTBUFFER;
/* pack_window_open() assured us we have [base_info, base_info + 20)
* as a range that we can look at without walking off the
* end of the mapped window. Its actually the hash size
@@ -480,7 +480,7 @@ git_off_t get_delta_base(
base_offset = c & 127;
while (c & 128) {
if (left <= used)
- return GIT_ESHORTBUFFER;
+ return GIT_SHORTBUFFER;
base_offset += 1;
if (!base_offset || MSB(base_offset, 7))
return 0; /* overflow */