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
e853b6cc
Commit
e853b6cc
authored
Mar 19, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5173 Cppcheck report
fixed bugs, found by cppcheck
parent
948056c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
mysys/ma_dyncol.c
mysys/ma_dyncol.c
+3
-3
sql/filesort_utils.h
sql/filesort_utils.h
+1
-1
No files found.
mysys/ma_dyncol.c
View file @
e853b6cc
...
...
@@ -1616,7 +1616,7 @@ dynamic_new_column_store(DYNAMIC_COLUMN *str,
enum
enum_dyncol_func_result
rc
=
ER_DYNCOL_RESOURCE
;
size_t
all_headers_size
;
if
(
!
(
columns_order
=
malloc
(
sizeof
(
void
*
)
*
column_count
)))
if
(
column_count
&&
!
(
columns_order
=
malloc
(
sizeof
(
void
*
)
*
column_count
)))
return
ER_DYNCOL_RESOURCE
;
if
(
new_str
||
str
->
str
==
0
)
{
...
...
@@ -3959,7 +3959,7 @@ mariadb_dyncol_val_long(longlong *ll, DYNAMIC_COLUMN_VALUE *val)
{
sign
=
-
1
;
src
++
;
}
else
if
(
*
src
==
'
-
'
)
}
else
if
(
*
src
==
'
+
'
)
src
++
;
while
(
len
&&
my_isdigit
(
&
my_charset_latin1
,
*
src
))
{
...
...
@@ -4032,7 +4032,7 @@ mariadb_dyncol_val_double(double *dbl, DYNAMIC_COLUMN_VALUE *val)
case
DYN_COL_STRING
:
{
char
*
str
,
*
end
;
if
((
str
=
malloc
(
val
->
x
.
string
.
value
.
length
+
1
)))
if
(
!
(
str
=
malloc
(
val
->
x
.
string
.
value
.
length
+
1
)))
return
ER_DYNCOL_RESOURCE
;
memcpy
(
str
,
val
->
x
.
string
.
value
.
str
,
val
->
x
.
string
.
value
.
length
);
str
[
val
->
x
.
string
.
value
.
length
]
=
'\0'
;
...
...
sql/filesort_utils.h
View file @
e853b6cc
...
...
@@ -95,7 +95,7 @@ public:
bool
check_sort_buffer_properties
(
uint
num_records
,
uint
record_length
)
{
return
(
static_cast
<
uint
>
(
m_idx_array
.
size
())
==
num_records
&&
m_record_length
==
m_
record_length
);
m_record_length
==
record_length
);
}
/// Frees the buffer.
...
...
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