summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-09 14:50:38 -0700
committerJunio C Hamano <gitster@pobox.com>2013-09-09 14:50:38 -0700
commitb0d974d6d94968a367909b2259bde9c6d4729298 (patch)
treefd147418ac5fddd7c8838fe988fb4c8590b7d8f5 /read-cache.c
parent20419de969b8ce0c49d133affdb1bb73eb62815e (diff)
parent7800c1ebcc12a7b667a2c76de109a85d272051a0 (diff)
downloadgit-b0d974d6d94968a367909b2259bde9c6d4729298.tar.gz
Merge branch 'tg/index-struct-sizes'
The code that reads from a region that mmaps an on-disk index assumed that "int"/"short" are always 32/16 bits. * tg/index-struct-sizes: read-cache: use fixed width integer types
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/read-cache.c b/read-cache.c
index 737a27f81b..885943a6df 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1230,14 +1230,14 @@ static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int reall
struct ondisk_cache_entry {
struct cache_time ctime;
struct cache_time mtime;
- unsigned int dev;
- unsigned int ino;
- unsigned int mode;
- unsigned int uid;
- unsigned int gid;
- unsigned int size;
+ uint32_t dev;
+ uint32_t ino;
+ uint32_t mode;
+ uint32_t uid;
+ uint32_t gid;
+ uint32_t size;
unsigned char sha1[20];
- unsigned short flags;
+ uint16_t flags;
char name[FLEX_ARRAY]; /* more */
};
@@ -1249,15 +1249,15 @@ struct ondisk_cache_entry {
struct ondisk_cache_entry_extended {
struct cache_time ctime;
struct cache_time mtime;
- unsigned int dev;
- unsigned int ino;
- unsigned int mode;
- unsigned int uid;
- unsigned int gid;
- unsigned int size;
+ uint32_t dev;
+ uint32_t ino;
+ uint32_t mode;
+ uint32_t uid;
+ uint32_t gid;
+ uint32_t size;
unsigned char sha1[20];
- unsigned short flags;
- unsigned short flags2;
+ uint16_t flags;
+ uint16_t flags2;
char name[FLEX_ARRAY]; /* more */
};