git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Brandon Casey <casey@nrlssc.navy.mil>,
	gitster@pobox.com, Brandon Casey <drafnel@gmail.com>
Subject: Re: [PATCH] notes.c: remove inappropriate call to return
Date: Thu, 18 Mar 2010 16:37:34 +0100	[thread overview]
Message-ID: <201003181637.35168.johan@herland.net> (raw)
In-Reply-To: <FMCfttz0yXy1PiW0rQs7llBXL-J_qvqMmKHhFzRD_pqpDVu1DBh0TUAi68oer0RcT3kMvGDNHiQ@cipher.nrlssc.navy.mil>

On Thursday 18 March 2010, Brandon Casey wrote:
> From: Brandon Casey <drafnel@gmail.com>
>
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
>
>
> Heh, I guess it's ok to call 'return' in a function returning
> void, but it shouldn't be passed an argument. :)
>
> -brandon
>
>
>  notes.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/notes.c b/notes.c
> index a4f9926..07941b7 100644
> --- a/notes.c
> +++ b/notes.c
> @@ -893,7 +893,7 @@ void remove_note(struct notes_tree *t, const
> unsigned char *object_sha1) assert(t->initialized);
>  	hashcpy(l.key_sha1, object_sha1);
>  	hashclr(l.val_sha1);
> -	return note_tree_remove(t, t->root, 0, &l);
> +	note_tree_remove(t, t->root, 0, &l);
>  }
>
>  const unsigned char *get_note(struct notes_tree *t,

Yes, I noticed this during a recent code review in some related code, 
but I haven't yet got around to posting a cleanup patch.

Acked-by: Johan Herland <johan@herland.net>


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

      reply	other threads:[~2010-03-18 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 14:50 [PATCH] notes.c: don't call 'return' in a void function Brandon Casey
2010-03-18 15:03 ` [PATCH] notes.c: remove inappropriate call to return Brandon Casey
2010-03-18 15:37   ` Johan Herland [this message]

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=201003181637.35168.johan@herland.net \
    --to=johan@herland.net \
    --cc=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 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).