List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/4] shared: remove return value from cgit_free_commitinfo()
@ 2016-08-13 11:04 john
  2016-08-13 11:04 ` [PATCH 2/4] shared: make cgit_free_taginfo() public john
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: john @ 2016-08-13 11:04 UTC (permalink / raw)


This return value is never used and the function always returns NULL.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 cgit.h   | 2 +-
 shared.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/cgit.h b/cgit.h
index 325432b..ec73dd3 100644
--- a/cgit.h
+++ b/cgit.h
@@ -343,7 +343,7 @@ extern void cgit_free_reflist_inner(struct reflist *list);
 extern int cgit_refs_cb(const char *refname, const struct object_id *oid,
 			int flags, void *cb_data);
 
-extern void *cgit_free_commitinfo(struct commitinfo *info);
+extern void cgit_free_commitinfo(struct commitinfo *info);
 
 void cgit_diff_tree_cb(struct diff_queue_struct *q,
 		       struct diff_options *options, void *data);
diff --git a/shared.c b/shared.c
index a63633b..432ce61 100644
--- a/shared.c
+++ b/shared.c
@@ -95,7 +95,7 @@ struct cgit_repo *cgit_get_repoinfo(const char *url)
 	return NULL;
 }
 
-void *cgit_free_commitinfo(struct commitinfo *info)
+void cgit_free_commitinfo(struct commitinfo *info)
 {
 	free(info->author);
 	free(info->author_email);
@@ -105,7 +105,6 @@ void *cgit_free_commitinfo(struct commitinfo *info)
 	free(info->msg);
 	free(info->msg_encoding);
 	free(info);
-	return NULL;
 }
 
 char *trim_end(const char *str, char c)
-- 
2.9.2.639.g855ae9f



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-13 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-13 11:04 [PATCH 1/4] shared: remove return value from cgit_free_commitinfo() john
2016-08-13 11:04 ` [PATCH 2/4] shared: make cgit_free_taginfo() public john
2016-08-13 11:04 ` [PATCH 3/4] ui-tag: clean up taginfo john
2016-08-13 11:04 ` [PATCH 4/4] ui-tree: remove a fixed size buffer john

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).