From b881c62f4f7970d6033ac60a980f7de8f91b63b3 Mon Sep 17 00:00:00 2001 From: Emmanuel Roullit Date: Wed, 18 Jul 2012 18:55:30 +0200 Subject: [PATCH] Fixed variable const qualifiers. To apply the constify pointer and content of a variable, it must follow this syntax: const type * const var; --- dabba/capture.c | 2 +- dabba/help.c | 4 ++-- dabba/include/dabba/help.h | 4 ++-- dabba/interface.c | 7 +++---- dabbad/help.c | 2 +- dabbad/include/dabbad/help.h | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dabba/capture.c b/dabba/capture.c index 94d506e..0d61501 100644 --- a/dabba/capture.c +++ b/dabba/capture.c @@ -128,7 +128,7 @@ static void display_capture_list_msg_header(void) printf(" captures:\n"); } -static void display_capture_list(const struct dabba_ipc_msg const *msg) +static void display_capture_list(const struct dabba_ipc_msg *const msg) { size_t a; diff --git a/dabba/help.c b/dabba/help.c index 6cee249..e3cb66f 100644 --- a/dabba/help.c +++ b/dabba/help.c @@ -42,7 +42,7 @@ struct cmdname_help { char help[80]; }; -void show_usage(const struct option const *opt) +void show_usage(const struct option *opt) { assert(opt); @@ -68,7 +68,7 @@ static inline void mput_char(char c, uint32_t num) putchar(c); } -void help_unknown_cmd(const char const *cmd) +void help_unknown_cmd(const char *const cmd) { assert(cmd); printf("'%s' is not a dabba command. See 'dabba --help'.\n", cmd); diff --git a/dabba/include/dabba/help.h b/dabba/include/dabba/help.h index 8172958..961202f 100644 --- a/dabba/include/dabba/help.h +++ b/dabba/include/dabba/help.h @@ -26,8 +26,8 @@ struct option; -void show_usage(const struct option const *opt); +void show_usage(const struct option *opt); int cmd_help(int argc, const char **argv); -void help_unknown_cmd(const char const *cmd); +void help_unknown_cmd(const char *const cmd); #endif /* HELP_H */ diff --git a/dabba/interface.c b/dabba/interface.c index e160195..99995ff 100644 --- a/dabba/interface.c +++ b/dabba/interface.c @@ -41,7 +41,7 @@ static void display_interface_list_header(void) printf(" interfaces:\n"); } -static void display_interface_list(const struct dabba_ipc_msg const *msg) +static void display_interface_list(const struct dabba_ipc_msg *const msg) { size_t a; @@ -60,8 +60,7 @@ static void prepare_interface_list_query(struct dabba_ipc_msg *msg) msg->msg_body.type = DABBA_IFCONF; } -static void display_interface_list_msg_header(const struct dabba_ipc_msg const - *msg) +static void display_interface_list_msg_header(const struct dabba_ipc_msg *const msg) { assert(msg); @@ -74,7 +73,7 @@ static void display_interface_list_msg_header(const struct dabba_ipc_msg const } } -static void display_interface_list_msg(const struct dabba_ipc_msg const *msg) +static void display_interface_list_msg(const struct dabba_ipc_msg *const msg) { assert(msg); diff --git a/dabbad/help.c b/dabbad/help.c index 74b06b8..374a1f1 100644 --- a/dabbad/help.c +++ b/dabbad/help.c @@ -38,7 +38,7 @@ static const char _usage[] = * \brief Show dabbad usage options */ -void show_usage(const struct option const *opt) +void show_usage(const struct option * opt) { assert(opt); diff --git a/dabbad/include/dabbad/help.h b/dabbad/include/dabbad/help.h index 6b593c6..bdfee57 100644 --- a/dabbad/include/dabbad/help.h +++ b/dabbad/include/dabbad/help.h @@ -24,6 +24,6 @@ #ifndef HELP_H #define HELP_H -void show_usage(const struct option const *opt); +void show_usage(const struct option *opt); #endif /* HELP_H */ -- 2.11.4.GIT