* [Patch] iproute2: clean up genl/genl.c::usage()
@ 2012-12-14 6:10 Cong Wang
2012-12-14 17:15 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2012-12-14 6:10 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Cong Wang
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"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] iproute2: clean up genl/genl.c::usage()
2012-12-14 6:10 [Patch] iproute2: clean up genl/genl.c::usage() Cong Wang
@ 2012-12-14 17:15 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2012-12-14 17:15 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev
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));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-14 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 6:10 [Patch] iproute2: clean up genl/genl.c::usage() Cong Wang
2012-12-14 17:15 ` Stephen Hemminger
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).