diff options
author | Edward Thomson <ethomson@github.com> | 2016-08-05 09:10:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-05 09:10:58 -0400 |
commit | cba60b9b0ef90ab2b69e5015627c7daa613dfda3 (patch) | |
tree | 92b00b0d349b4fc453e6988fd355b462215875c7 | |
parent | 73dab7692e780e1df96093a54854795428eb66b4 (diff) | |
parent | 274a727e0bac38fdfe04e8b4999056169d48c325 (diff) | |
download | libgit2-cba60b9b0ef90ab2b69e5015627c7daa613dfda3.tar.gz |
Merge pull request #3884 from pks-t/pks/patch-image-initialization
Patch image initialization
-rw-r--r-- | src/apply.c | 2 | ||||
-rw-r--r-- | src/pool.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/apply.c b/src/apply.c index 40ba647f4..10bf1f492 100644 --- a/src/apply.c +++ b/src/apply.c @@ -38,7 +38,7 @@ static void patch_line_init( out->content_offset = in_offset; } -#define PATCH_IMAGE_INIT { {0} } +#define PATCH_IMAGE_INIT { GIT_POOL_INIT, GIT_VECTOR_INIT } static int patch_image_init_fromstr( patch_image *out, const char *in, size_t in_len) diff --git a/src/pool.h b/src/pool.h index e0fafa997..f61f16944 100644 --- a/src/pool.h +++ b/src/pool.h @@ -35,6 +35,8 @@ typedef struct { uint32_t page_size; /* size of page in bytes */ } git_pool; +#define GIT_POOL_INIT { NULL, 0, 0 } + #else /** @@ -57,6 +59,9 @@ typedef struct { uint32_t item_size; uint32_t page_size; } git_pool; + +#define GIT_POOL_INIT { GIT_VECTOR_INIT, 0, 0 } + #endif /** |