summaryrefslogtreecommitdiff
path: root/src/tree.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-11-28 19:18:29 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-11-28 19:21:52 +0100
commitee42bb0e3d6534b8ac4d48df90b1bb85323972ea (patch)
treeee7d34a5dbbb8aa29f974aa1b678a1431bad95e0 /src/tree.h
parent2580077fc2cbb124409bbc6453f2923217ac7957 (diff)
downloadlibgit2-ee42bb0e3d6534b8ac4d48df90b1bb85323972ea.tar.gz
tree: make path len uint16_t and avoid holes
This reduces the size of the struct from 32 to 26 bytes, and leaves a single padding byte at the end of the struct (which comes from the zero-length array).
Diffstat (limited to 'src/tree.h')
-rw-r--r--src/tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree.h b/src/tree.h
index 51f42ca32..914d788c8 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -16,9 +16,9 @@
struct git_tree_entry {
uint16_t attr;
+ uint16_t filename_len;
git_oid oid;
bool pooled;
- size_t filename_len;
char filename[GIT_FLEX_ARRAY];
};