diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-29 13:55:09 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-29 13:55:09 -0700 |
commit | 92c2f4a177cdb77aab262f71c87257e840f4a43c (patch) | |
tree | 6913e31ecc7c02d250254249cf866eae43ed0dc2 /src/cli_new.c | |
parent | 4215394e00c9c6e9d36293112f30b1ed45654b71 (diff) | |
download | vyatta-cfg-92c2f4a177cdb77aab262f71c87257e840f4a43c.tar.gz vyatta-cfg-92c2f4a177cdb77aab262f71c87257e840f4a43c.zip |
Add annotation to cli functions
Use gcc annotations for noreturn and printf like formats
Diffstat (limited to 'src/cli_new.c')
-rw-r--r-- | src/cli_new.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/cli_new.c b/src/cli_new.c index 34f8af0..33430bd 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -110,7 +110,7 @@ char *cli_operation_name = NULL; printf("echo \"bla-bla-bla%s\";", sptr) note very important ';' as the end of the format */ -void bye(char *msg, ...) +void bye(const char *msg, ...) { va_list ap; @@ -135,7 +135,7 @@ void bye(char *msg, ...) which are executed as eval `command` in order to modify BASH env */ -void print_msg(char *msg, ...) +void print_msg(const char *msg, ...) { va_list ap; @@ -367,7 +367,7 @@ get_config_lock() return ret; } -void internal_error(int line, char *file) +void internal_error(int line, const char *file) { printf("\n\nInternal Error at line %d in %s\n", line, file); exit (-1); @@ -802,7 +802,7 @@ int char2val(vtw_def *def, char *value, valstruct *valp) compare two values per cond returns result of comparison ****************************************************/ -boolean val_cmp(valstruct *left, valstruct *right, vtw_cond_e cond) +boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond) { unsigned int left_parts[9], right_parts[9]; vtw_type_e val_type; @@ -2118,12 +2118,7 @@ const char *type_to_name(vtw_type_e type) { } } -#if 1 -void -dump_log(int argc, char **argv) -{ -} -#else +#ifdef CLI_DEBUG void dump_log(int argc, char **argv) { int i; |