Skip to content

Commit

Permalink
Merge 3.1 into 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jun 26, 2023
2 parents 56b5156 + d543bed commit 5af90f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions libmariadb/mariadb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,7 @@ void my_set_error(MYSQL *mysql,
{
va_list ap;

const char *errmsg;
const char *errmsg= format;

mysql->net.last_errno= error_nr;
ma_strmake(mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH);
Expand All @@ -2359,8 +2359,7 @@ void my_set_error(MYSQL *mysql,
}

va_start(ap, format);
vsnprintf(mysql->net.last_error, MYSQL_ERRMSG_SIZE - 1,
format ? format : errmsg, ap);
vsnprintf(mysql->net.last_error, MYSQL_ERRMSG_SIZE - 1, errmsg, ap);
va_end(ap);
return;
}
Expand Down
5 changes: 2 additions & 3 deletions libmariadb/mariadb_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void stmt_set_error(MYSQL_STMT *stmt,
{
va_list ap;

const char *errmsg;
const char *errmsg= format;

stmt->last_errno= error_nr;
ma_strmake(stmt->sqlstate, sqlstate, SQLSTATE_LENGTH);
Expand All @@ -118,8 +118,7 @@ void stmt_set_error(MYSQL_STMT *stmt,
}

va_start(ap, format);
vsnprintf(stmt->last_error, MYSQL_ERRMSG_SIZE - 1,
format ? format : errmsg, ap);
vsnprintf(stmt->last_error, MYSQL_ERRMSG_SIZE - 1, errmsg, ap);
va_end(ap);
return;
}
Expand Down

0 comments on commit 5af90f0

Please sign in to comment.