diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-06 09:31:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-06 09:31:17 -0700 |
commit | f755494cec27fed8c9693bb91c26762061518b0b (patch) | |
tree | 9802a641645e28694535343c2e3e1fbe9733e5cf /commit.c | |
parent | f6069c5995114d0fb2fba1140be5db717ff3b396 (diff) | |
download | git-f755494cec27fed8c9693bb91c26762061518b0b.tar.gz git-f755494cec27fed8c9693bb91c26762061518b0b.tar.xz |
Make "insert_by_date()" match "commit_list_insert()"
Same argument order, same return type. This allows us to use a function
pointer to choose one over the other.
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -147,7 +147,7 @@ void free_commit_list(struct commit_list *list) } } -void insert_by_date(struct commit_list **list, struct commit *item) +struct commit_list * insert_by_date(struct commit *item, struct commit_list **list) { struct commit_list **pp = list; struct commit_list *p; @@ -157,7 +157,7 @@ void insert_by_date(struct commit_list **list, struct commit *item) } pp = &p->next; } - commit_list_insert(item, pp); + return commit_list_insert(item, pp); } @@ -165,7 +165,7 @@ void sort_by_date(struct commit_list **list) { struct commit_list *ret = NULL; while (*list) { - insert_by_date(&ret, (*list)->item); + insert_by_date((*list)->item, &ret); *list = (*list)->next; } *list = ret; @@ -186,7 +186,7 @@ struct commit *pop_most_recent_commit(struct commit_list **list, parse_commit(commit); if (!(commit->object.flags & mark)) { commit->object.flags |= mark; - insert_by_date(list, commit); + insert_by_date(commit, list); } parents = parents->next; } |