From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To: undisclosed-recipients:;
Subject: [PATCH] Use fixed-size integers for the on-disk pack structure.
Date: Wed, 17 Jan 2007 09:07:23 +0100	[thread overview]
Message-ID: <20070118003108.1F8FEA907@diphong.localdomain> (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
                 reply	other threads:[~2007-01-18  0:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=20070118003108.1F8FEA907@diphong.localdomain \
    --to=corecode@fs.ei.tum.de \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
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).