[RFC,1/2] batctl: Combine command section attributes
Commit Message
The __used__ and __section__ attribute for the batctl commands can be
combined together to simplify the COMMAND_NAMED macro.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -112,7 +112,7 @@ struct command {
.usage = (_usage), \
}; \
static const struct command *__command_ ## _name ## _ ## _type \
- __attribute__((__used__)) __attribute__ ((__section__ ("__command"))) = &command_ ## _name ## _ ## _type
+ __attribute__((__used__,__section__ ("__command"))) = &command_ ## _name ## _ ## _type
#define COMMAND(_type, _handler, _abbr, _flags, _arg, _usage) \
COMMAND_NAMED(_type, _handler, _abbr, _handler, _flags, _arg, _usage)