diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-05 15:34:19 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-08-05 15:34:19 +0300 |
commit | 99f7f9a907bd0aa2fc43dc2b192b29ec42330ec7 (patch) | |
tree | 1f14300a8f95891aff71bf267d5b096d3f8b1ff6 /mysys/my_getopt.c | |
parent | 7d0c4cb5c65e4e882ad20e7e317400fa527df9e9 (diff) | |
parent | 82e2ca0181cdf3682c965ee500dc40472d07b41d (diff) | |
download | mariadb-git-99f7f9a907bd0aa2fc43dc2b192b29ec42330ec7.tar.gz |
merge
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index e9fa6f6bee2..1c5bf0b6b1c 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -611,16 +611,16 @@ static int setval(const struct my_option *opts, void *value, char *argument, Accept an integer representation of the enumerated item. */ char *endptr; - uint arg= (uint) strtoul(argument, &endptr, 10); + ulong arg= strtoul(argument, &endptr, 10); if (*endptr || arg >= opts->typelib->count) { res= EXIT_ARGUMENT_INVALID; goto ret; } - *(uint*)value= arg; + *(ulong*)value= arg; } else - *(uint*)value= type - 1; + *(ulong*)value= type - 1; } break; case GET_SET: @@ -1016,7 +1016,7 @@ static void init_one_value(const struct my_option *option, void *variable, *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL); break; case GET_ENUM: - *((uint*) variable)= (uint) value; + *((ulong*) variable)= (ulong) value; break; case GET_UINT: *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL); @@ -1292,7 +1292,7 @@ void my_print_variables(const struct my_option *options) printf("\n"); break; case GET_ENUM: - printf("%s\n", get_type(optp->typelib, *(uint*) value)); + printf("%s\n", get_type(optp->typelib, *(ulong*) value)); break; case GET_STR: case GET_STR_ALLOC: /* fall through */ |