diff options
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index f97550d4429..e579d8154db 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -28,23 +28,22 @@ static void default_reporter(enum loglevel level, const char *format, ...); my_error_reporter my_getopt_error_reporter= &default_reporter; static int findopt(char *optpat, uint length, - const struct my_option **opt_res, - char **ffname); + const struct my_option **opt_res, + char **ffname); my_bool getopt_compare_strings(const char *s, - const char *t, - uint length); + const char *t, + uint length); static longlong getopt_ll(char *arg, const struct my_option *optp, int *err); static ulonglong getopt_ull(char *arg, const struct my_option *optp, - int *err); + int *err); static double getopt_double(char *arg, const struct my_option *optp, int *err); static void init_variables(const struct my_option *options, init_func_p init_one_value); -static void init_one_value(const struct my_option *option, uchar* *variable, - longlong value); +static void init_one_value(const struct my_option *opt, uchar* *, longlong); static void fini_one_value(const struct my_option *option, uchar* *variable, longlong value); -static int setval(const struct my_option *opts, uchar* *value, char *argument, - my_bool set_maximum_value); +static int setval(const struct my_option *opts, uchar **value, char *argument, + my_bool set_maximum_value); static char *check_struct_option(char *cur_arg, char *key_name); /* @@ -775,7 +774,7 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name) return num; } -/* +/* function: getopt_ll Evaluates and returns the value that user gave as an argument @@ -922,7 +921,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, my_getopt_error_reporter(WARNING_LEVEL, "option '%s': unsigned value %s adjusted to %s", optp->name, ullstr(old, buf1), ullstr(num, buf2)); - return num; } @@ -963,8 +961,8 @@ static double getopt_double(char *arg, const struct my_option *optp, int *err) SYNOPSIS init_one_value() - option Option to initialize - value Pointer to variable + option Option to initialize + value Pointer to variable */ static void init_one_value(const struct my_option *option, uchar* *variable, @@ -993,7 +991,7 @@ static void init_one_value(const struct my_option *option, uchar* *variable, case GET_LL: *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL); break; - case GET_ULL: + case GET_ULL: /* Fall through */ case GET_SET: *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL); break; @@ -1061,7 +1059,7 @@ void my_cleanup_options(const struct my_option *options) } -/* +/* initialize all variables to their default values SYNOPSIS |