summaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorSimon 'corecode' Schubert <corecode@fs.ei.tum.de>2007-01-17 09:07:23 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-18 14:11:50 -0800
commitbb7910319412aea9fecc3625dfcae23da84ee5f1 (patch)
tree9aae7ca11a113aa1975e116a6ad82879e853caea /pack.h
parent917a8f891f1ceeb48609f99ba3b32e022ac766f9 (diff)
downloadgit-bb7910319412aea9fecc3625dfcae23da84ee5f1.tar.gz
Use fixed-size integers for the on-disk pack structure.
Plain integer types without a fixed size can vary between platforms. Even though all common platforms use 32-bit ints, there is no guarantee that this won't change at some point. Furthermore, specifying an integer type with explicit size makes the definition of structures more obvious. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack.h')
-rw-r--r--pack.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack.h b/pack.h
index 790ff4a396..821706fbcd 100644
--- a/pack.h
+++ b/pack.h
@@ -10,9 +10,9 @@
#define PACK_VERSION 2
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
struct pack_header {
- unsigned int hdr_signature;
- unsigned int hdr_version;
- unsigned int hdr_entries;
+ uint32_t hdr_signature;
+ uint32_t hdr_version;
+ uint32_t hdr_entries;
};
/*