diff options
author | Vicent Martà <tanoku@gmail.com> | 2011-09-19 06:54:18 +0400 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2011-09-19 06:54:18 +0400 |
commit | 3125929bc43b3a91ccfe35a6c30aa135bafa4c0b (patch) | |
tree | d2969da340f5b79d2ea6b25b8ff1150d62d8ca90 /src/filebuf.c | |
parent | b6ed727a4570a506473c481a344880f99b4ef64d (diff) | |
parent | c8f16bfef992452fb4ef7622a2ecd810c1937225 (diff) |
Merge pull request #393 from schu/unused-but-set-variable
filebuf.c: fix unused-but-set warning
Diffstat (limited to 'src/filebuf.c')
-rw-r--r-- | src/filebuf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/filebuf.c b/src/filebuf.c index 26f401312..bc1a8dceb 100644 --- a/src/filebuf.c +++ b/src/filebuf.c @@ -108,7 +108,8 @@ static int write_deflate(git_filebuf *file, void *source, size_t len) zs->avail_out = (uInt)file->buf_size; result = deflate(zs, file->flush_mode); - assert(result != Z_STREAM_ERROR); + if (result == Z_STREAM_ERROR) + return git__throw(GIT_ERROR, "Failed to deflate input"); have = file->buf_size - (size_t)zs->avail_out; |