Repository : ssh://git@diktynna/batctl
On branch : master
>---------------------------------------------------------------
commit ee58ab83187f85b2a1677cbb5d5536189cea5510
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Jun 5 14:45:10 2021 +0200
batctl: Combine command section attributes
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(a)narfation.org>
>---------------------------------------------------------------
ee58ab83187f85b2a1677cbb5d5536189cea5510
main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.h b/main.h
index d1bea23..00b2ab3 100644
--- a/main.h
+++ b/main.h
@@ -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)