iproute2: clean up genl/genl.c::usage()
Subsystems (2)
PATCH 1/1 iproute2: clean up genl/genl.c::usage()
gcc attribute can be used in definition, no need to redeclare it.
Cc Stephen Hemminger <[email protected]>
Signed-off-by Cong Wang <[email protected]>
---
genl/genl.c +1 -3
@@ -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"
Quoted 23 lines · On Fri, 14 Dec 2012 14:10:38 +0800 Cong Wang <[email protected]> wrote:
gcc attribute can be used in definition, no need to redeclare it.
Cc Stephen Hemminger <[email protected]>Signed-off-by Cong Wang <[email protected]>---
genl/genl.c +1
-4@@ -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" --
Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
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));