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/variable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces/ecpg/preproc/variable.c') 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); -- cgit v1.2.1