1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Standardize treatment of strcmp() return value

Always compare the return value to 0, don't use cute tricks like
if (!strcmp(...)).
This commit is contained in:
Peter Eisentraut
2011-12-27 21:19:09 +02:00
parent d383c23f6f
commit 037a82704c
27 changed files with 85 additions and 86 deletions

View File

@ -1650,9 +1650,9 @@ ecpg_execute(struct statement * stmt)
ecpg_log("ecpg_execute on line %d: OK: %s\n", stmt->lineno, cmdstat);
if (stmt->compat != ECPG_COMPAT_INFORMIX_SE &&
!sqlca->sqlerrd[2] &&
(!strncmp(cmdstat, "UPDATE", 6)
|| !strncmp(cmdstat, "INSERT", 6)
|| !strncmp(cmdstat, "DELETE", 6)))
(strncmp(cmdstat, "UPDATE", 6) == 0
|| strncmp(cmdstat, "INSERT", 6) == 0
|| strncmp(cmdstat, "DELETE", 6) == 0))
ecpg_raise(stmt->lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL);
break;
case PGRES_COPY_OUT: