{"thread":{"id":"6415","subject":"[PATCH] Use fixed-size integers for the on-disk pack structure.","startedAt":"2007-01-17T08:07:23Z","lastAt":"2007-01-17T08:07:23Z","messageCount":1,"participants":["Simon 'corecode' Schubert"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31932","messageId":"20070118003108.1F8FEA907@diphong.localdomain","threadId":"6415","inReplyTo":null,"subject":"[PATCH] Use fixed-size integers for the on-disk pack structure.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2007-01-17T08:07:23Z","receivedAt":"2007-01-17T08:07:23Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Plain integer types without a fixed size can vary between platforms.  Even\nthough all common platforms use 32-bit ints, there is no guarantee that\nthis won't change at some point.  Furthermore, specifying an integer type\nwith explicit size makes the definition of structures more obvious.\n---\n pack.h |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/pack.h b/pack.h\nindex 4814800..8aab5bb 100644\n--- a/pack.h\n+++ b/pack.h\n@@ -10,9 +10,9 @@\n #define PACK_VERSION 2\n #define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))\n struct pack_header {\n-\tunsigned int hdr_signature;\n-\tunsigned int hdr_version;\n-\tunsigned int hdr_entries;\n+\tuint32_t hdr_signature;\n+\tuint32_t hdr_version;\n+\tuint32_t hdr_entries;\n };\n \n extern int verify_pack(struct packed_git *, int);\n-- \n1.5.0.rc1.g8bef\n"}]}