summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c44cdc7)
raw | patch | inline | side by side (parent: c44cdc7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 16 Aug 2006 05:57:57 +0000 (01:57 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 14 Jan 2007 07:15:04 +0000 (02:15 -0500) |
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index 2953e80cde573ffe461e7917b47c576f74e04612..d5651693ba5e48c980c4eb3854480234f2e536ce 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
static void init_pack_header()
{
- const char* magic = "PACK";
- unsigned long version = 3;
- unsigned long zero = 0;
-
- version = htonl(version);
- ywrite(pack_fd, (char*)magic, 4);
- ywrite(pack_fd, &version, 4);
- ywrite(pack_fd, &zero, 4);
- pack_offset = 4 * 3;
+ struct pack_header hdr;
+
+ hdr.hdr_signature = htonl(PACK_SIGNATURE);
+ hdr.hdr_version = htonl(2);
+ hdr.hdr_entries = 0;
+
+ ywrite(pack_fd, &hdr, sizeof(hdr));
+ pack_offset = sizeof(hdr);
}
static void fixup_header_footer()