diff options
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 6 | ||||
-rw-r--r-- | src/interfaces/ecpg/ecpglib/descriptor.c | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/ecpglib/execute.c | 6 | ||||
-rw-r--r-- | src/interfaces/ecpg/ecpglib/prepare.c | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/descriptor.c | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.addons | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.header | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/output.c | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/pgc.l | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/type.c | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/variable.c | 2 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-lobj.c | 20 |
12 files changed, 31 insertions, 31 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index fc0455607b..db975035df 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -97,19 +97,19 @@ get_float8_nan(void) static bool check_special_value(char *ptr, double *retval, char **endptr) { - if (!pg_strncasecmp(ptr, "NaN", 3)) + if (pg_strncasecmp(ptr, "NaN", 3) == 0) { *retval = get_float8_nan(); *endptr = ptr + 3; return true; } - else if (!pg_strncasecmp(ptr, "Infinity", 8)) + else if (pg_strncasecmp(ptr, "Infinity", 8) == 0) { *retval = get_float8_infinity(); *endptr = ptr + 8; return true; } - else if (!pg_strncasecmp(ptr, "-Infinity", 9)) + else if (pg_strncasecmp(ptr, "-Infinity", 9) == 0) { *retval = -get_float8_infinity(); *endptr = ptr + 9; diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index 17a956ea5d..1dde52c42f 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -652,7 +652,7 @@ ECPGdeallocate_desc(int line, const char *name) ecpg_init_sqlca(sqlca); for (desc = get_descriptors(), prev = NULL; desc; prev = desc, desc = desc->next) { - if (!strcmp(name, desc->name)) + if (strcmp(name, desc->name) == 0) { if (prev) prev->next = desc->next; diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index b8e48a366c..f468147b29 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -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: diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c index 60c9c50b22..c5a554e8e2 100644 --- a/src/interfaces/ecpg/ecpglib/prepare.c +++ b/src/interfaces/ecpg/ecpglib/prepare.c @@ -361,7 +361,7 @@ SearchStmtCache(const char *ecpgQuery) { if (stmtCacheEntries[entNo].stmtID[0]) /* check if entry is in use */ { - if (!strcmp(ecpgQuery, stmtCacheEntries[entNo].ecpgQuery)) + if (strcmp(ecpgQuery, stmtCacheEntries[entNo].ecpgQuery) == 0) break; /* found it */ } ++entNo; /* incr entry # */ diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c index 965963de7e..52865293f2 100644 --- a/src/interfaces/ecpg/preproc/descriptor.c +++ b/src/interfaces/ecpg/preproc/descriptor.c @@ -106,11 +106,11 @@ drop_descriptor(char *name, char *connection) for (i = descriptors; i; lastptr = &i->next, i = i->next) { - if (!strcmp(name, i->name)) + if (strcmp(name, i->name) == 0) { if ((!connection && !i->connection) || (connection && i->connection - && !strcmp(connection, i->connection))) + && strcmp(connection, i->connection) == 0)) { *lastptr = i->next; if (i->connection) @@ -135,11 +135,11 @@ lookup_descriptor(char *name, char *connection) for (i = descriptors; i; i = i->next) { - if (!strcmp(name, i->name)) + if (strcmp(name, i->name) == 0) { if ((!connection && !i->connection) || (connection && i->connection - && !strcmp(connection, i->connection))) + && strcmp(connection, i->connection) == 0)) return i; } } diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons index 849a37cf9d..5c5adf7699 100644 --- a/src/interfaces/ecpg/preproc/ecpg.addons +++ b/src/interfaces/ecpg/preproc/ecpg.addons @@ -102,7 +102,7 @@ ECPG: stmtViewStmt rule { const char *con = connection ? connection : "NULL"; - if (!strcmp($1, "all")) + if (strcmp($1, "all") == 0) fprintf(yyout, "{ ECPGdeallocate_all(__LINE__, %d, %s);", compat, con); else if ($1[0] == ':') fprintf(yyout, "{ ECPGdeallocate(__LINE__, %d, %s, %s);", compat, con, $1+1); diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header index 1ea6ce444e..94c45c88c0 100644 --- a/src/interfaces/ecpg/preproc/ecpg.header +++ b/src/interfaces/ecpg/preproc/ecpg.header @@ -262,7 +262,7 @@ adjust_outofscope_cursor_vars(struct cursor *cur) skip_set_var = true; } else if ((ptr->variable->type->type == ECPGt_char_variable) - && (!strncmp(ptr->variable->name, "ECPGprepared_statement", strlen("ECPGprepared_statement")))) + && (strncmp(ptr->variable->name, "ECPGprepared_statement", strlen("ECPGprepared_statement")) == 0)) { newvar = ptr->variable; skip_set_var = true; @@ -468,7 +468,7 @@ adjust_outofscope_cursor_vars(struct cursor *cur) /* This tests whether the cursor was declared and opened in the same function. */ #define SAMEFUNC(cur) \ ((cur->function == NULL) || \ - (cur->function != NULL && !strcmp(cur->function, current_function))) + (cur->function != NULL && strcmp(cur->function, current_function) == 0)) static struct cursor * add_additional_variables(char *name, bool insert) diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c index 9958a0a5df..389a5272d4 100644 --- a/src/interfaces/ecpg/preproc/output.c +++ b/src/interfaces/ecpg/preproc/output.c @@ -163,7 +163,7 @@ output_deallocate_prepare_statement(char *name) { const char *con = connection ? connection : "NULL"; - if (strcmp(name, "all")) + if (strcmp(name, "all") != 0) { fprintf(yyout, "{ ECPGdeallocate(__LINE__, %d, %s, ", compat, con); output_escaped_str(name, true); diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 0d1355c2cb..7ca1d0ffc4 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -1319,7 +1319,7 @@ parse_include(void) yyin = fopen(inc_file, "r"); if (!yyin) { - if (strcmp(inc_file + strlen(inc_file) - 2, ".h")) + if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0) { strcat(inc_file, ".h"); yyin = fopen(inc_file, "r"); @@ -1346,7 +1346,7 @@ parse_include(void) yyin = fopen(inc_file, "r"); if (!yyin) { - if (strcmp(inc_file + strlen(inc_file) - 2, ".h")) + if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0) { strcat(inc_file, ".h"); yyin = fopen( inc_file, "r" ); diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index f467a7f9c9..9934105c34 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -257,7 +257,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, const int bra if ((var->type->type != type->type) || (var->type->type_name && !type->type_name) || (!var->type->type_name && type->type_name) || - (var->type->type_name && type->type_name && strcmp(var->type->type_name, type->type_name))) + (var->type->type_name && type->type_name && strcmp(var->type->type_name, type->type_name) != 0)) mmerror(PARSE_ERROR, ET_ERROR, "variable \"%s\" is hidden by a local variable of a different type", name); else if (var->brace_level != brace_level) mmerror(PARSE_ERROR, ET_WARNING, "variable \"%s\" is hidden by a local variable", name); @@ -271,7 +271,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, const int bra if ((var->type->type != ind_type->type) || (var->type->type_name && !ind_type->type_name) || (!var->type->type_name && ind_type->type_name) || - (var->type->type_name && ind_type->type_name && strcmp(var->type->type_name, ind_type->type_name))) + (var->type->type_name && ind_type->type_name && strcmp(var->type->type_name, ind_type->type_name) != 0)) mmerror(PARSE_ERROR, ET_ERROR, "indicator variable \"%s\" is hidden by a local variable of a different type", ind_name); else if (var->brace_level != ind_brace_level) mmerror(PARSE_ERROR, ET_WARNING, "indicator variable \"%s\" is hidden by a local variable", ind_name); diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c index 3ea438709a..e08e14ac18 100644 --- a/src/interfaces/ecpg/preproc/variable.c +++ b/src/interfaces/ecpg/preproc/variable.c @@ -491,7 +491,7 @@ get_typedef(char *name) { struct typedefs *this; - for (this = types; this && strcmp(this->name, name); this = this->next); + for (this = types; this && strcmp(this->name, name) != 0; this = this->next); if (!this) mmerror(PARSE_ERROR, ET_FATAL, "unrecognized data type name \"%s\"", name); diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c index 27f93e6af7..17e65de15c 100644 --- a/src/interfaces/libpq/fe-lobj.c +++ b/src/interfaces/libpq/fe-lobj.c @@ -752,25 +752,25 @@ lo_initialize(PGconn *conn) { fname = PQgetvalue(res, n, 0); foid = (Oid) atoi(PQgetvalue(res, n, 1)); - if (!strcmp(fname, "lo_open")) + if (strcmp(fname, "lo_open") == 0) lobjfuncs->fn_lo_open = foid; - else if (!strcmp(fname, "lo_close")) + else if (strcmp(fname, "lo_close") == 0) lobjfuncs->fn_lo_close = foid; - else if (!strcmp(fname, "lo_creat")) + else if (strcmp(fname, "lo_creat") == 0) lobjfuncs->fn_lo_creat = foid; - else if (!strcmp(fname, "lo_create")) + else if (strcmp(fname, "lo_create") == 0) lobjfuncs->fn_lo_create = foid; - else if (!strcmp(fname, "lo_unlink")) + else if (strcmp(fname, "lo_unlink") == 0) lobjfuncs->fn_lo_unlink = foid; - else if (!strcmp(fname, "lo_lseek")) + else if (strcmp(fname, "lo_lseek") == 0) lobjfuncs->fn_lo_lseek = foid; - else if (!strcmp(fname, "lo_tell")) + else if (strcmp(fname, "lo_tell") == 0) lobjfuncs->fn_lo_tell = foid; - else if (!strcmp(fname, "lo_truncate")) + else if (strcmp(fname, "lo_truncate") == 0) lobjfuncs->fn_lo_truncate = foid; - else if (!strcmp(fname, "loread")) + else if (strcmp(fname, "loread") == 0) lobjfuncs->fn_lo_read = foid; - else if (!strcmp(fname, "lowrite")) + else if (strcmp(fname, "lowrite") == 0) lobjfuncs->fn_lo_write = foid; } |