mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Fix more strcmp() calls using boolean-like comparisons for result checks
Such calls can confuse the reader as strcmp() uses an integer as result. The places patched here have been spotted by Thomas Munro, David Rowley and myself. Author: Michael Paquier Reviewed-by: David Rowley Discussion: https://postgr.es/m/20190411021946.GG2728@paquier.xyz
This commit is contained in:
@ -219,7 +219,8 @@ LockViewRecurse_walker(Node *node, LockViewRecurse_context *context)
|
||||
* skipped.
|
||||
*/
|
||||
if (relid == context->viewoid &&
|
||||
(!strcmp(rte->eref->aliasname, "old") || !strcmp(rte->eref->aliasname, "new")))
|
||||
(strcmp(rte->eref->aliasname, "old") == 0 ||
|
||||
strcmp(rte->eref->aliasname, "new") == 0))
|
||||
continue;
|
||||
|
||||
/* Currently, we only allow plain tables or views to be locked. */
|
||||
|
Reference in New Issue
Block a user