All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git Mailing List <git@vger.kernel.org>,
	Etienne Buira <etienne.buira@gmail.com>
Subject: Re: [PATCH] run-command: use void to declare that functions take no parameters
Date: Mon, 10 Nov 2014 14:43:10 -0800	[thread overview]
Message-ID: <xmqq7fz28yo1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54612B4C.8010609@web.de> ("René Scharfe"'s message of "Mon, 10 Nov 2014 22:17:00 +0100")

René Scharfe <l.s.r@web.de> writes:

> Explicitly declare that git_atexit_dispatch() and git_atexit_clear()
> take no parameters instead of leaving their parameter list empty and
> thus unspecified.
>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---

Thanks.

I was kind of surprised after running a git blame to find that this
is a recent thing, and the same patch looked quite substandard with
numerious style violations, and I somehow managed to let them slip
in X-<.  Perhaps I was having a bad day or something...

>  run-command.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/run-command.c b/run-command.c
> index 79a0a76..a476999 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -636,7 +636,7 @@ static struct {
>  
>  static int git_atexit_installed;
>  
> -static void git_atexit_dispatch()
> +static void git_atexit_dispatch(void)
>  {
>  	size_t i;
>  
> @@ -644,7 +644,7 @@ static void git_atexit_dispatch()
>  		git_atexit_hdlrs.handlers[i-1]();
>  }
>  
> -static void git_atexit_clear()
> +static void git_atexit_clear(void)
>  {
>  	free(git_atexit_hdlrs.handlers);
>  	memset(&git_atexit_hdlrs, 0, sizeof(git_atexit_hdlrs));

  reply	other threads:[~2014-11-10 22:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 21:17 [PATCH] run-command: use void to declare that functions take no parameters René Scharfe
2014-11-10 22:43 ` Junio C Hamano [this message]
2014-11-11  2:54   ` Jeff King
2014-11-11 17:32     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fz28yo1.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=etienne.buira@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.