netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [Patch] iproute2: clean up genl/genl.c::usage()
Date: Fri, 14 Dec 2012 09:15:37 -0800	[thread overview]
Message-ID: <20121214091537.23f22262@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1355465438-20586-1-git-send-email-amwang@redhat.com>

On Fri, 14 Dec 2012 14:10:38 +0800
Cong Wang <amwang@redhat.com> wrote:

> gcc attribute can be used in definition, no need to
> redeclare it.
> 
> Cc: Stephen Hemminger <shemminger@vyatta.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
> 
> ---
> diff --git a/genl/genl.c b/genl/genl.c
> index 49b6596..a1e55e0 100644
> --- a/genl/genl.c
> +++ b/genl/genl.c
> @@ -97,9 +97,7 @@ noexist:
>  	return f;
>  }
>  
> -static void usage(void) __attribute__((noreturn));
> -
> -static void usage(void)
> +static void __attribute__((noreturn)) usage(void)
>  {
>  	fprintf(stderr, "Usage: genl [ OPTIONS ] OBJECT | help }\n"
>  	                "where  OBJECT := { ctrl etc }\n"
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Why bother, all the other older code uses the prototype version,
besides the optimizing of usage() function is ridiculous anyway.
I am just going to remove all the 
  static void usage(void) __attribute__((noreturn));

      reply	other threads:[~2012-12-14 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  6:10 [Patch] iproute2: clean up genl/genl.c::usage() Cong Wang
2012-12-14 17:15 ` Stephen Hemminger [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=20121214091537.23f22262@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=amwang@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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).