git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use fixed-size integers for the on-disk pack structure.
@ 2007-01-17  8:07 Simon 'corecode' Schubert
  0 siblings, 0 replies; only message in thread
From: Simon 'corecode' Schubert @ 2007-01-17  8:07 UTC (permalink / raw)


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.
---
 pack.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pack.h b/pack.h
index 4814800..8aab5bb 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;
 };
 
 extern int verify_pack(struct packed_git *, int);
-- 
1.5.0.rc1.g8bef

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-18  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-17  8:07 [PATCH] Use fixed-size integers for the on-disk pack structure Simon 'corecode' Schubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).