From 037a82704ce644e2b1c3946345b54444caddb1a5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Dec 2011 21:19:09 +0200 Subject: Standardize treatment of strcmp() return value Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)). --- src/interfaces/ecpg/preproc/descriptor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/interfaces/ecpg/preproc/descriptor.c') 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; } } -- cgit v1.2.1