Skip to content

Commit cba60b9

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#3884 from pks-t/pks/patch-image-initialization
Patch image initialization
2 parents 73dab76 + 274a727 commit cba60b9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void patch_line_init(
3838
out->content_offset = in_offset;
3939
}
4040

41-
#define PATCH_IMAGE_INIT { {0} }
41+
#define PATCH_IMAGE_INIT { GIT_POOL_INIT, GIT_VECTOR_INIT }
4242

4343
static int patch_image_init_fromstr(
4444
patch_image *out, const char *in, size_t in_len)

src/pool.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ typedef struct {
3535
uint32_t page_size; /* size of page in bytes */
3636
} git_pool;
3737

38+
#define GIT_POOL_INIT { NULL, 0, 0 }
39+
3840
#else
3941

4042
/**
@@ -57,6 +59,9 @@ typedef struct {
5759
uint32_t item_size;
5860
uint32_t page_size;
5961
} git_pool;
62+
63+
#define GIT_POOL_INIT { GIT_VECTOR_INIT, 0, 0 }
64+
6065
#endif
6166

6267
/**

0 commit comments

Comments
 (0)