git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] write_idx_file should use an unsigned nr_objects parameter
@ 2011-03-31  1:24 Dan McGee
  2011-03-31  1:24 ` [PATCH 2/4] Use uint32_t for unpack-objects counters Dan McGee
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dan McGee @ 2011-03-31  1:24 UTC (permalink / raw)
  To: git; +Cc: Dan McGee

This follows the precedent set in the pack-objects code and being
adjusted for in index-pack and unpack-objects.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 pack-write.c |    6 +++---
 pack.h       |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pack-write.c b/pack-write.c
index a905ca4..c2de03a 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -18,15 +18,15 @@ static int sha1_compare(const void *_a, const void *_b)
  * will be sorted by SHA1 on exit.
  */
 const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects,
-			   int nr_objects, unsigned char *sha1)
+			   uint32_t nr_objects, unsigned char *sha1)
 {
 	struct sha1file *f;
 	struct pack_idx_entry **sorted_by_sha, **list, **last;
 	off_t last_obj_offset = 0;
 	uint32_t array[256];
-	int i, fd;
+	uint32_t i, index_version;
+	int fd;
 	git_SHA_CTX ctx;
-	uint32_t index_version;
 
 	if (nr_objects) {
 		sorted_by_sha = objects;
diff --git a/pack.h b/pack.h
index bb27576..c588454 100644
--- a/pack.h
+++ b/pack.h
@@ -55,7 +55,7 @@ struct pack_idx_entry {
 	off_t offset;
 };
 
-extern const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects, int nr_objects, unsigned char *sha1);
+extern const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects, uint32_t nr_objects, unsigned char *sha1);
 extern int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, off_t offset, off_t len, unsigned int nr);
 extern int verify_pack_index(struct packed_git *);
 extern int verify_pack(struct packed_git *);
-- 
1.7.4.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-01 18:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31  1:24 [PATCH 1/4] write_idx_file should use an unsigned nr_objects parameter Dan McGee
2011-03-31  1:24 ` [PATCH 2/4] Use uint32_t for unpack-objects counters Dan McGee
2011-03-31  1:24 ` [PATCH 3/4] Use uint32_t for index-pack counters Dan McGee
2011-03-31  1:24 ` [PATCH 4/4] Unify pack header checking between index-pack and unpack-objects Dan McGee
2011-04-01 18:28 ` [PATCH 1/4] write_idx_file should use an unsigned nr_objects parameter Junio C Hamano
2011-04-01 18:36   ` Dan McGee

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).