git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] object.c: remove unused functions

From
しらいしななこ <nanako3@lavabit.com>
Date
Jun 18, 2008, 23:21 UTC
Message-ID
<20080619082108.6117@nanako3.lavabit.com>

Removes unused functions object_list_append(), object_list_legnth() and bject_list_contains().

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
---
This is my first foray into C programming, so please be kind.
 object.c |   31 -------------------------------
 object.h |    7 -------
 2 files changed, 0 insertions(+), 38 deletions(-)
diff --git a/object.c b/object.c
index 50b6528..b386d58 100644
--- a/object.c
+++ b/object.c
@@ -215,37 +215,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) {
-		if (list->item == obj)
-			return 1;
-		list = list->next;
-	}
-	return 0;
-}
-
 void add_object_array(struct object *obj, const char *name, struct object_array *array)
 {
 	add_object_array_with_mode(obj, name, array, S_IFINVALID);
diff --git a/object.h b/object.h
index 036bd66..8405fd2 100644
--- a/object.h
+++ b/object.h
@@ -61,13 +61,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 .. */
 void add_object_array(struct object *obj, const char *name, struct object_array *array);
 void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode);
-- 
1.5.5.4
Message 1 of 1 in “object.c: remove unused functions”
  1. object.c: remove unused functionsしらいしななこ, Jun 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.