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:
authorRussell Belfer <arrbee@arrbee.com>2012-03-13 09:55:40 +0400
committerRussell Belfer <arrbee@arrbee.com>2012-03-13 09:55:40 +0400
commite1de726c15937a8dbf81d12ef0c872cf6576ebd0 (patch)
tree84b437dd23e8250b0a4f983875fb3849569ad63a /src/blob.c
parentdda708e78f3c3f43d814d46c29ab9f2b9d47ed5c (diff)
Migrate ODB files to new error handling
This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blob.c b/src/blob.c
index b67f8afa5..60a6b55d6 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -78,7 +78,7 @@ static int write_file_stream(git_oid *oid, git_odb *odb, const char *path, git_o
char buffer[4096];
git_odb_stream *stream = NULL;
- if ((error = git_odb_open_wstream(&stream, odb, file_size, GIT_OBJ_BLOB)) < GIT_SUCCESS)
+ if ((error = git_odb_open_wstream(&stream, odb, (size_t)file_size, GIT_OBJ_BLOB)) < GIT_SUCCESS)
return error;
if ((fd = p_open(path, O_RDONLY)) < 0) {