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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5e72092e
Commit
5e72092e
authored
Jun 29, 2005
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post review fixes (second review)
parent
8a057135
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
mysys/default_modify.c
mysys/default_modify.c
+4
-2
No files found.
mysys/default_modify.c
View file @
5e72092e
...
@@ -71,7 +71,7 @@ int modify_defaults_file(const char *file_location, const char *option,
...
@@ -71,7 +71,7 @@ int modify_defaults_file(const char *file_location, const char *option,
uint
opt_len
,
optval_len
,
sect_len
,
nr_newlines
=
0
,
buffer_size
;
uint
opt_len
,
optval_len
,
sect_len
,
nr_newlines
=
0
,
buffer_size
;
my_bool
in_section
=
FALSE
,
opt_applied
=
0
;
my_bool
in_section
=
FALSE
,
opt_applied
=
0
;
uint
reserve_extended
=
1
,
old_opt_len
=
0
;
uint
reserve_extended
=
1
,
old_opt_len
=
0
;
uint
new_opt_len
=
opt_len
+
1
+
optval_len
+
NEWLINE_LEN
;
uint
new_opt_len
;
int
reserve_occupied
=
0
;
int
reserve_occupied
=
0
;
DBUG_ENTER
(
"modify_defaults_file"
);
DBUG_ENTER
(
"modify_defaults_file"
);
...
@@ -80,11 +80,13 @@ int modify_defaults_file(const char *file_location, const char *option,
...
@@ -80,11 +80,13 @@ int modify_defaults_file(const char *file_location, const char *option,
/* my_fstat doesn't use the flag parameter */
/* my_fstat doesn't use the flag parameter */
if
(
my_fstat
(
fileno
(
cnf_file
),
&
file_stat
,
MYF
(
0
)))
if
(
my_fstat
(
fileno
(
cnf_file
),
&
file_stat
,
MYF
(
0
)))
goto
err
;
goto
malloc_
err
;
opt_len
=
(
uint
)
strlen
(
option
);
opt_len
=
(
uint
)
strlen
(
option
);
optval_len
=
(
uint
)
strlen
(
option_value
);
optval_len
=
(
uint
)
strlen
(
option_value
);
new_opt_len
=
opt_len
+
1
+
optval_len
+
NEWLINE_LEN
;
/* calculate the size of the buffer we need */
/* calculate the size of the buffer we need */
buffer_size
=
sizeof
(
char
)
*
(
file_stat
.
st_size
+
buffer_size
=
sizeof
(
char
)
*
(
file_stat
.
st_size
+
/* option name len */
/* option name len */
...
...
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