summaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-12-27 21:19:09 +0200
committerPeter Eisentraut <peter_e@gmx.net>2011-12-27 21:19:09 +0200
commit037a82704ce644e2b1c3946345b54444caddb1a5 (patch)
treed89abc55ac119b86d69c01f819ab8fb22a1382c6 /src/bin/psql/tab-complete.c
parentd383c23f6fbc4a79dae66483cf4f7051121008ad (diff)
Standardize treatment of strcmp() return value
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r--src/bin/psql/tab-complete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 473706246d0..61779c69633 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2368,7 +2368,7 @@ psql_completion(char *text, int start, int end)
/* Complete LOCK [TABLE] <table> with "IN" */
else if ((pg_strcasecmp(prev2_wd, "LOCK") == 0 &&
- pg_strcasecmp(prev_wd, "TABLE")) ||
+ pg_strcasecmp(prev_wd, "TABLE") != 0) ||
(pg_strcasecmp(prev2_wd, "TABLE") == 0 &&
pg_strcasecmp(prev3_wd, "LOCK") == 0))
COMPLETE_WITH_CONST("IN");