Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27ed8ac

Browse files
author
Hiroshi Inoue
committed
Fix a misuse of 'char *' declaration.
1 parent897a895 commit27ed8ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/interfaces/odbc/connection.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ CC_lookup_pg_version(ConnectionClass *self)
14031403
HSTMThstmt;
14041404
StatementClass*stmt;
14051405
RETCODEresult;
1406-
char*szVersion="0.0";
1406+
charszVersion[32];
14071407
intmajor,minor;
14081408
staticchar*func="CC_lookup_pg_version";
14091409

@@ -1439,6 +1439,7 @@ static char *func = "CC_lookup_pg_version";
14391439

14401440
/* Extract the Major and Minor numbers from the string. */
14411441
/* This assumes the string starts 'Postgresql X.X' */
1442+
strcpy(szVersion,"0.0");
14421443
if (sscanf(self->pg_version,"%*s %d.%d",&major,&minor) >=2) {
14431444
sprintf(szVersion,"%d.%d",major,minor);
14441445
self->pg_version_major=major;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp