Skip to content

Commit

Permalink
object.c: remove unused functions
Browse files Browse the repository at this point in the history
object_list_append() and object_list_length}() are not used anywhere.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Jan 18, 2010
1 parent 229d810 commit c761898
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
21 changes: 0 additions & 21 deletions object.c
Expand Up @@ -217,27 +217,6 @@ struct object_list *object_list_insert(struct object *item,
return new_list;
}

void object_list_append(struct object *item,
struct object_list **list_p)
{
while (*list_p) {
list_p = &((*list_p)->next);
}
*list_p = xmalloc(sizeof(struct object_list));
(*list_p)->next = NULL;
(*list_p)->item = item;
}

unsigned object_list_length(struct object_list *list)
{
unsigned ret = 0;
while (list) {
list = list->next;
ret++;
}
return ret;
}

int object_list_contains(struct object_list *list, struct object *obj)
{
while (list) {
Expand Down
5 changes: 0 additions & 5 deletions object.h
Expand Up @@ -72,11 +72,6 @@ struct object *lookup_unknown_object(const unsigned char *sha1);
struct object_list *object_list_insert(struct object *item,
struct object_list **list_p);

void object_list_append(struct object *item,
struct object_list **list_p);

unsigned object_list_length(struct object_list *list);

int object_list_contains(struct object_list *list, struct object *obj);

/* Object array handling .. */
Expand Down

0 comments on commit c761898

Please sign in to comment.