]>
Commit | Line | Data |
---|---|---|
4e42f754 JB |
1 | --- mysql-4.1.10/mysys/my_getopt.c.orig 2005-02-12 21:37:32.000000000 +0100 |
2 | +++ mysql-4.1.10/mysys/my_getopt.c 2005-03-04 10:52:33.000000000 +0100 | |
f909fa2c JB |
3 | @@ -34,7 +34,7 @@ |
4 | static ulonglong getopt_ull(char *arg, const struct my_option *optp, | |
5 | int *err); | |
6 | static void init_variables(const struct my_option *options); | |
7 | -static int setval(const struct my_option *opts, gptr *value, char *argument, | |
8 | +static int setval(const struct my_option *opts, gptr value, char *argument, | |
9 | my_bool set_maximum_value); | |
10 | static char *check_struct_option(char *cur_arg, char *key_name); | |
11 | ||
12 | @@ -96,7 +96,7 @@ | |
13 | char **pos, **pos_end, *optend, *prev_found, | |
14 | *opt_str, key_name[FN_REFLEN]; | |
15 | const struct my_option *optp; | |
16 | - gptr *value; | |
17 | + gptr value; | |
18 | int error; | |
19 | ||
20 | LINT_INIT(opt_found); | |
21 | @@ -537,14 +537,14 @@ | |
22 | Will set the option value to given value | |
23 | */ | |
24 | ||
25 | -static int setval(const struct my_option *opts, gptr *value, char *argument, | |
26 | +static int setval(const struct my_option *opts, gptr value, char *argument, | |
27 | my_bool set_maximum_value) | |
28 | { | |
29 | int err= 0; | |
30 | ||
31 | if (value && argument) | |
32 | { | |
33 | - gptr *result_pos= ((set_maximum_value) ? | |
34 | + gptr result_pos= ((set_maximum_value) ? | |
35 | opts->u_max_value : value); | |
36 | ||
37 | if (!result_pos) | |
4e42f754 JB |
38 | @@ -738,7 +738,7 @@ |
39 | value Pointer to variable | |
40 | */ | |
41 | ||
42 | -static void init_one_value(const struct my_option *option, gptr *variable, | |
43 | +static void init_one_value(const struct my_option *option, gptr variable, | |
44 | longlong value) | |
45 | { | |
46 | switch ((option->var_type & GET_TYPE_MASK)) { | |
47 | @@ -793,12 +793,12 @@ | |
48 | set the value to default value. | |
49 | */ | |
50 | if (options->u_max_value) | |
51 | - init_one_value(options, options->u_max_value, options->max_value); | |
52 | + init_one_value(options, (gptr)(options->u_max_value), options->max_value); | |
53 | if (options->value) | |
54 | - init_one_value(options, options->value, options->def_value); | |
55 | + init_one_value(options, (gptr)(options->value), options->def_value); | |
56 | if (options->var_type & GET_ASK_ADDR && | |
57 | (variable= (*getopt_get_addr)("", 0, options))) | |
58 | - init_one_value(options, variable, options->def_value); | |
59 | + init_one_value(options, (gptr)variable, options->def_value); | |
60 | } | |
61 | } | |
62 | ||
f909fa2c JB |
63 | @@ -898,7 +898,7 @@ |
64 | printf("--------------------------------- -----------------------------\n"); | |
65 | for (optp= options; optp->id; optp++) | |
66 | { | |
67 | - gptr *value= (optp->var_type & GET_ASK_ADDR ? | |
68 | + gptr value= (optp->var_type & GET_ASK_ADDR ? | |
69 | (*getopt_get_addr)("", 0, optp) : optp->value); | |
70 | if (value) | |
71 | { |