Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ae134314
Commit
ae134314
authored
May 20, 2009
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix accessing ulong enum option as uint, failing on 64-bit big-endian.
parent
a129a824
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mysys/my_getopt.c
mysys/my_getopt.c
+3
-3
No files found.
mysys/my_getopt.c
View file @
ae134314
...
...
@@ -647,7 +647,7 @@ static int setval(const struct my_option *opts, uchar* *value, char *argument,
return
EXIT_OUT_OF_MEMORY
;
break
;
case
GET_ENUM
:
if
(((
*
(
int
*
)
result_pos
)
=
find_type
(
argument
,
opts
->
typelib
,
2
)
-
1
)
<
0
)
if
(((
*
(
ulong
*
)
result_pos
)
=
find_type
(
argument
,
opts
->
typelib
,
2
)
-
1
)
<
0
)
return
EXIT_ARGUMENT_INVALID
;
break
;
case
GET_SET
:
...
...
@@ -983,7 +983,7 @@ static void init_one_value(const struct my_option *option, uchar* *variable,
*
((
int
*
)
variable
)
=
(
int
)
getopt_ll_limit_value
((
int
)
value
,
option
,
NULL
);
break
;
case
GET_ENUM
:
*
((
u
int
*
)
variable
)
=
(
uint
)
value
;
*
((
u
long
*
)
variable
)
=
(
uint
)
value
;
break
;
case
GET_UINT
:
*
((
uint
*
)
variable
)
=
(
uint
)
getopt_ull_limit_value
((
uint
)
value
,
option
,
NULL
);
...
...
@@ -1221,7 +1221,7 @@ void my_print_variables(const struct my_option *options)
}
break
;
case
GET_ENUM
:
printf
(
"%s
\n
"
,
get_type
(
optp
->
typelib
,
*
(
u
int
*
)
value
));
printf
(
"%s
\n
"
,
get_type
(
optp
->
typelib
,
*
(
u
long
*
)
value
));
break
;
case
GET_STR
:
case
GET_STR_ALLOC
:
/* fall through */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment