Skip to content

Commit

Permalink
odbc: Return correct type from odbc_set_stmt_query
Browse files Browse the repository at this point in the history
Make clear we return an ODBC error code.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
  • Loading branch information
freddy77 committed Feb 10, 2025
1 parent 73b8f31 commit 22116be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/freetds/odbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ typedef union {
# define _WIDE
# define ODBC_CHAR SQLCHAR
#endif
int odbc_set_stmt_query(struct _hstmt *stmt, const ODBC_CHAR *sql, int sql_len _WIDE);
SQLRETURN odbc_set_stmt_query(struct _hstmt *stmt, const ODBC_CHAR *sql, int sql_len _WIDE);
void odbc_set_return_status(struct _hstmt *stmt, unsigned int n_row);
void odbc_set_return_params(struct _hstmt *stmt, unsigned int n_row);

Expand Down
2 changes: 1 addition & 1 deletion src/odbc/odbc_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static DSTR *odbc_mb2utf(TDS_DBC *dbc, DSTR *res, const char *s, unsigned int le
static DSTR *odbc_wide2utf(DSTR *res, const SQLWCHAR *s, unsigned int len);
#endif

int
SQLRETURN
odbc_set_stmt_query(TDS_STMT * stmt, const ODBC_CHAR *sql, int sql_len _WIDE)
{
if (sql_len == SQL_NTS)
Expand Down

0 comments on commit 22116be

Please sign in to comment.