From: Jonathan Nieder Date: Thu, 04 Dec 2014 23:28:53 GMT Subject: Re: [PATCH 04/23] expire_reflog(): remove unused parameter Message-ID: <20141204232853.GD16345@google.com> In-Reply-To: <1417734515-11812-5-git-send-email-mhagger@alum.mit.edu> Michael Haggerty wrote: > --- a/builtin/reflog.c > +++ b/builtin/reflog.c > @@ -349,7 +349,7 @@ static int push_tip_to_list(const char *refname, const unsigned char *sha1, int > return 0; > } > > -static int expire_reflog(const char *ref, const unsigned char *sha1, int unused, void *cb_data) > +static int expire_reflog(const char *ref, const unsigned char *sha1, void *cb_data) > { > struct cmd_reflog_expire_cb *cmd = cb_data; On second thought: why not update the last parameter to be a 'struct cmd_reflog_expire_cb *' instead of 'void *' while at it, like this? builtin/reflog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git i/builtin/reflog.c w/builtin/reflog.c index 3e11bee..d860624 100644 --- i/builtin/reflog.c +++ w/builtin/reflog.c @@ -349,9 +349,8 @@ static int push_tip_to_list(const char *refname, const unsigned char *sha1, int return 0; } -static int expire_reflog(const char *ref, const unsigned char *sha1, void *cb_data) +static int expire_reflog(const char *ref, const unsigned char *sha1, struct cmd_reflog_expire_cb *cmd) { - struct cmd_reflog_expire_cb *cmd = cb_data; struct expire_reflog_cb cb; struct ref_lock *lock; char *log_file, *newlog_path = NULL;