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
ea0a0c73
Commit
ea0a0c73
authored
Oct 15, 2002
by
jani@rhols221.adsl.netsonic.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in my_getopt
parent
3c1a3113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
mysys/my_getopt.c
mysys/my_getopt.c
+14
-7
No files found.
mysys/my_getopt.c
View file @
ea0a0c73
...
@@ -634,31 +634,38 @@ static void init_variables(const struct my_option *options)
...
@@ -634,31 +634,38 @@ static void init_variables(const struct my_option *options)
{
{
switch
(
options
->
var_type
)
{
switch
(
options
->
var_type
)
{
case
GET_BOOL
:
case
GET_BOOL
:
*
((
my_bool
*
)
options
->
u_max_value
)
=
(
my_bool
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
my_bool
*
)
options
->
u_max_value
)
=
(
my_bool
)
options
->
max_value
;
*
((
my_bool
*
)
options
->
value
)
=
(
my_bool
)
options
->
def_value
;
*
((
my_bool
*
)
options
->
value
)
=
(
my_bool
)
options
->
def_value
;
break
;
break
;
case
GET_INT
:
case
GET_INT
:
*
((
int
*
)
options
->
u_max_value
)
=
(
int
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
int
*
)
options
->
u_max_value
)
=
(
int
)
options
->
max_value
;
*
((
int
*
)
options
->
value
)
=
(
int
)
options
->
def_value
;
*
((
int
*
)
options
->
value
)
=
(
int
)
options
->
def_value
;
break
;
break
;
case
GET_UINT
:
case
GET_UINT
:
*
((
uint
*
)
options
->
u_max_value
)
=
(
uint
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
uint
*
)
options
->
u_max_value
)
=
(
uint
)
options
->
max_value
;
*
((
uint
*
)
options
->
value
)
=
(
uint
)
options
->
def_value
;
*
((
uint
*
)
options
->
value
)
=
(
uint
)
options
->
def_value
;
break
;
break
;
case
GET_LONG
:
case
GET_LONG
:
*
((
long
*
)
options
->
u_max_value
)
=
(
long
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
long
*
)
options
->
u_max_value
)
=
(
long
)
options
->
max_value
;
*
((
long
*
)
options
->
value
)
=
(
long
)
options
->
def_value
;
*
((
long
*
)
options
->
value
)
=
(
long
)
options
->
def_value
;
break
;
break
;
case
GET_ULONG
:
case
GET_ULONG
:
*
((
ulong
*
)
options
->
u_max_value
)
=
(
ulong
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
ulong
*
)
options
->
u_max_value
)
=
(
ulong
)
options
->
max_value
;
*
((
ulong
*
)
options
->
value
)
=
(
ulong
)
options
->
def_value
;
*
((
ulong
*
)
options
->
value
)
=
(
ulong
)
options
->
def_value
;
break
;
break
;
case
GET_LL
:
case
GET_LL
:
*
((
longlong
*
)
options
->
u_max_value
)
=
(
longlong
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
longlong
*
)
options
->
u_max_value
)
=
(
longlong
)
options
->
max_value
;
*
((
longlong
*
)
options
->
value
)
=
(
longlong
)
options
->
def_value
;
*
((
longlong
*
)
options
->
value
)
=
(
longlong
)
options
->
def_value
;
break
;
break
;
case
GET_ULL
:
case
GET_ULL
:
*
((
ulonglong
*
)
options
->
u_max_value
)
=
(
ulonglong
)
options
->
max_value
;
if
(
options
->
u_max_value
)
*
((
ulonglong
*
)
options
->
u_max_value
)
=
(
ulonglong
)
options
->
max_value
;
*
((
ulonglong
*
)
options
->
value
)
=
(
ulonglong
)
options
->
def_value
;
*
((
ulonglong
*
)
options
->
value
)
=
(
ulonglong
)
options
->
def_value
;
break
;
break
;
default:
/* dummy default to avoid compiler warnings */
default:
/* dummy default to avoid compiler warnings */
...
...
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