summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-05-31 10:19:55 -0700
committerRussell Belfer <rb@github.com>2014-05-31 10:19:55 -0700
commitbc81220dfcf3419085c545b4a271aa04178c6960 (patch)
tree8c7d832ac7ccc59d83587427513def7115ca2347
parent947a58c17557d634f16f7efc547b5b236575a3b9 (diff)
downloadlibgit2-bc81220dfcf3419085c545b4a271aa04178c6960.tar.gz
minor cleanups
-rw-r--r--src/diff_print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/diff_print.c b/src/diff_print.c
index 72fe69482..bb925ef98 100644
--- a/src/diff_print.c
+++ b/src/diff_print.c
@@ -298,15 +298,15 @@ static int print_binary_hunk(diff_print_info *pi, git_blob *old, git_blob *new)
old_data_len = old ? git_blob_rawsize(old) : 0;
new_data_len = new ? git_blob_rawsize(new) : 0;
- if (!git__is_ulong(old_data_len) || !git__is_ulong(new_data_len)) {
- error = GIT_EBUFS;
- goto done;
- }
+ /* The git_delta function accepts unsigned long only */
+ if (!git__is_ulong(old_data_len) || !git__is_ulong(new_data_len))
+ return GIT_EBUFS;
out = &deflate;
inflated_len = (unsigned long)new_data_len;
- if ((error = git_zstream_deflatebuf(out, new_data, (size_t)new_data_len)) < 0)
+ if ((error = git_zstream_deflatebuf(
+ out, new_data, (size_t)new_data_len)) < 0)
goto done;
/* The git_delta function accepts unsigned long only */