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
75cfee68
Commit
75cfee68
authored
Apr 14, 2005
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post review fix
parent
b698b862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
mysys/default.c
mysys/default.c
+18
-9
No files found.
mysys/default.c
View file @
75cfee68
...
@@ -418,15 +418,16 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
...
@@ -418,15 +418,16 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
/* trim trailing whitespace from directory name */
/* trim trailing whitespace from directory name */
end
=
ptr
+
strlen
(
ptr
)
-
1
;
end
=
ptr
+
strlen
(
ptr
)
-
1
;
/*
/* fgets() stores the newline character in the buffer */
This would work fine even if no whitespaces are met
if
((
end
[
0
]
==
'\n'
)
||
(
end
[
0
]
==
'\r'
)
||
since fgets() stores the newline character in the buffer
my_isspace
(
&
my_charset_latin1
,
end
[
0
]))
*/
{
for
(;
my_isspace
(
&
my_charset_latin1
,
*
(
end
-
1
));
end
--
)
for
(;
my_isspace
(
&
my_charset_latin1
,
*
(
end
-
1
));
end
--
)
{}
{}
end
[
0
]
=
0
;
end
[
0
]
=
0
;
}
/* print error msg if there is nothing after !inludedir directive */
/* print error msg if there is nothing after !in
c
ludedir directive */
if
(
end
==
ptr
)
if
(
end
==
ptr
)
{
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -444,7 +445,7 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
...
@@ -444,7 +445,7 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
search_file
=
search_dir
->
dir_entry
+
i
;
search_file
=
search_dir
->
dir_entry
+
i
;
ext
=
fn_ext
(
search_file
->
name
);
ext
=
fn_ext
(
search_file
->
name
);
/* check extens
t
ion */
/* check extension */
for
(
tmp_ext
=
(
char
**
)
f_extensions
;
*
tmp_ext
;
*
tmp_ext
++
)
for
(
tmp_ext
=
(
char
**
)
f_extensions
;
*
tmp_ext
;
*
tmp_ext
++
)
{
{
if
(
!
strcmp
(
ext
,
*
tmp_ext
))
if
(
!
strcmp
(
ext
,
*
tmp_ext
))
...
@@ -496,6 +497,14 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
...
@@ -496,6 +497,14 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
continue
;
continue
;
}
}
else
if
(
recursion_level
>=
max_recursion_level
)
{
fprintf
(
stderr
,
"warning: skipping !include directive as maximum include"
"recursion level was reached in file %s at line %d
\n
"
,
name
,
line
);
}
if
(
*
ptr
==
'['
)
/* Group name */
if
(
*
ptr
==
'['
)
/* Group name */
{
{
...
...
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