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

Commit492059d

Browse files
author
Michael Meskes
committed
Move from strcmp to strncmp to be more tolerant for changes to the parser.
1 parentef9ed9b commit492059d

File tree

1 file changed

+2
-2
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+2
-2
lines changed

‎src/interfaces/ecpg/ecpglib/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.42 2008/05/16 15:20:03 petere Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.43 2008/11/01 19:53:35 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -204,7 +204,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
204204
PQclear(res);
205205
}
206206

207-
if (strcmp(transaction,"commit")==0||strcmp(transaction,"rollback")==0)
207+
if (strncmp(transaction,"commit",6)==0||strncmp(transaction,"rollback",8)==0)
208208
con->committed= true;
209209
else
210210
con->committed= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp