зеркало из https://github.com/microsoft/git.git
object.c: remove unused functions
object_list_append() and object_list_length}() are not used anywhere. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
229d810747
Коммит
c76189875b
21
object.c
21
object.c
|
@ -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) {
|
||||
|
|
5
object.h
5
object.h
|
@ -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 .. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче