diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2013-08-18 21:41:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-20 12:29:42 -0700 |
commit | 7800c1ebcc12a7b667a2c76de109a85d272051a0 (patch) | |
tree | b42f0f217dd3e19f760cb60bd817e997cc52efaa /read-cache.c | |
parent | 4d06473928ee574910accbde05c19ef2263abdf6 (diff) | |
download | git-7800c1ebcc12a7b667a2c76de109a85d272051a0.tar.gz |
read-cache: use fixed width integer typestg/index-struct-sizes
Use the fixed width integer types uint16_t and uint32_t for on-disk
structures; unsigned short and unsigned int do not have a guaranteed
size.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/read-cache.c b/read-cache.c index c3d5e3543f..44145c2234 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1229,14 +1229,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 */ }; @@ -1248,15 +1248,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 */ }; |