Skip to contentSkip to conversation

iproute2: clean up genl/genl.c::usage()

PATCH In review Cong Wang 2 participants 2 messages Dec 14, 2012

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

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]>

---

genl/genl.c +1 -3
index 49b6596..a1e55e0 100644
@@ -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"
#1 lore raw
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]>

---

genl/genl.c +1 -4
index 49b6596..a1e55e0 100644
@@ -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));