diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-02-04 10:27:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-04 10:27:39 +0000 |
| commit | 26f5d36d2f14dc1d711ed0a2c844ef4d7887a9b3 (patch) | |
| tree | c8117a672f65bbdba472d2534f9c801a94b2f94f /src/common.h | |
| parent | 8abd514c270ba3b3fc42c6d5feefedc4cc65dd9b (diff) | |
| parent | 2a8841ae8750b52645eb85dd56305798a429a26d (diff) | |
| download | libgit2-26f5d36d2f14dc1d711ed0a2c844ef4d7887a9b3.tar.gz | |
Merge pull request #4489 from libgit2/ethomson/conflicts_crlf
Conflict markers should match EOL style in conflicting files
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 5fb4a608f..44063be12 100644 --- a/src/common.h +++ b/src/common.h @@ -230,6 +230,12 @@ GIT_INLINE(void) git__init_structure(void *structure, size_t len, unsigned int v GIT_ADD_SIZET_OVERFLOW(out, *(out), three) || \ GIT_ADD_SIZET_OVERFLOW(out, *(out), four)) { return -1; } +#define GITERR_CHECK_ALLOC_ADD5(out, one, two, three, four, five) \ + if (GIT_ADD_SIZET_OVERFLOW(out, one, two) || \ + GIT_ADD_SIZET_OVERFLOW(out, *(out), three) || \ + GIT_ADD_SIZET_OVERFLOW(out, *(out), four) || \ + GIT_ADD_SIZET_OVERFLOW(out, *(out), five)) { return -1; } + /** Check for multiplicative overflow, failing if it would occur. */ #define GITERR_CHECK_ALLOC_MULTIPLY(out, nelem, elsize) \ if (GIT_MULTIPLY_SIZET_OVERFLOW(out, nelem, elsize)) { return -1; } |
