Skip to content

Commit

Permalink
Add conversion to the types expected by the memset()
Browse files Browse the repository at this point in the history
  • Loading branch information
FaramosCZ committed May 24, 2018
1 parent a12a0b8 commit 8848959
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libmariadb/ma_stmt_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static void convert_from_long(MYSQL_BIND *r_param, const MYSQL_FIELD *field, lon
len < field->length && len < r_param->buffer_length)
{
ma_bmove_upp(buffer + field->length, buffer + len, len);
memset((char*) buffer, '0', field->length - len);
memset((void*) buffer, (int) '0', field->length - len);
len= field->length;
}
convert_froma_string(r_param, buffer, len);
Expand Down Expand Up @@ -612,7 +612,7 @@ static void convert_from_float(MYSQL_BIND *r_param, const MYSQL_FIELD *field, fl
if (field->length < length || field->length > MAX_DOUBLE_STRING_REP_LENGTH - 1)
break;
ma_bmove_upp(buff + field->length, buff + length, length);
memset((char*) buff, '0', field->length - length);
memset((void*) buff, (int) '0', field->length - length);
length= field->length;
}

Expand Down Expand Up @@ -711,7 +711,7 @@ static void convert_from_double(MYSQL_BIND *r_param, const MYSQL_FIELD *field, d
if (field->length < length || field->length > MAX_DOUBLE_STRING_REP_LENGTH - 1)
break;
ma_bmove_upp(buff + field->length, buff + length, length);
memset((char*) buff, '0', field->length - length);
memset((void*) buff, (int) '0', field->length - length);
length= field->length;
}
convert_froma_string(r_param, buff, length);
Expand Down

0 comments on commit 8848959

Please sign in to comment.