summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-02-11 09:39:38 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2015-02-12 22:54:47 -0500
commit2884cc42de8b20a58cec8488d014a853d47c047e (patch)
tree19dbb80072107fe65c7dd1de5dd849cc6914b154 /src/buffer.c
parent4aa664ae3953d99c2ae4cd769f02818bc122eebc (diff)
downloadlibgit2-2884cc42de8b20a58cec8488d014a853d47c047e.tar.gz
overflow checking: don't make callers set oom
Have the ALLOC_OVERFLOW testing macros also simply set_oom in the case where a computation would overflow, so that callers don't need to.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8098bb1e7..0d0314439 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -105,7 +105,6 @@ int git_buf_grow_by(git_buf *buffer, size_t additional_size)
{
if (GIT_ALLOC_OVERFLOW_ADD(buffer->size, additional_size)) {
buffer->ptr = git_buf__oom;
- giterr_set_oom();
return -1;
}