summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be12681)
raw | patch | inline | side by side (parent: be12681)
author | Dan McGee <dpmcgee@gmail.com> | |
Tue, 18 Oct 2011 05:21:22 +0000 (00:21 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Oct 2011 07:16:32 +0000 (00:16 -0700) |
This is done in some of the new pack layout code introduced in commit
1b4bb16b9ec331c. This more closely matches the nr_objects global that is
unsigned that these variables are based off of and bounded by.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1b4bb16b9ec331c. This more closely matches the nr_objects global that is
unsigned that these variables are based off of and bounded by.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c | patch | blob | history |
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 70b757e79256cb30d23547655edba41756c7885b..865a7d471ac34587b6ea30f390da704b9277e5bd 100644 (file)
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
}
static inline void add_to_write_order(struct object_entry **wo,
- int *endp,
+ unsigned int *endp,
struct object_entry *e)
{
if (e->filled)
}
static void add_descendants_to_write_order(struct object_entry **wo,
- int *endp,
+ unsigned int *endp,
struct object_entry *e)
{
struct object_entry *child;
}
static void add_family_to_write_order(struct object_entry **wo,
- int *endp,
+ unsigned int *endp,
struct object_entry *e)
{
struct object_entry *root;
static struct object_entry **compute_write_order(void)
{
- int i, wo_end;
+ unsigned int i, wo_end;
struct object_entry **wo = xmalloc(nr_objects * sizeof(*wo));
* Make sure delta_sibling is sorted in the original
* recency order.
*/
- for (i = nr_objects - 1; 0 <= i; i--) {
- struct object_entry *e = &objects[i];
+ for (i = nr_objects; i > 0;) {
+ struct object_entry *e = &objects[--i];
if (!e->delta)
continue;
/* Mark me as the first child */