aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/lockcmds.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-10-17 08:38:39 +0200
committerPeter Eisentraut <peter@eisentraut.org>2020-11-11 08:03:51 +0100
commitc77f6f50e4187bed38d1d36ae16b0c248e286d15 (patch)
treeaec90088f2a4f1c445a0b4540b7ec8a0fa4e6fec /src/backend/commands/lockcmds.c
parentec29427ce2a451e7fef7a22de6db8147d8a80994 (diff)
downloadpostgresql-c77f6f50e4187bed38d1d36ae16b0c248e286d15.tar.gz
postgresql-c77f6f50e4187bed38d1d36ae16b0c248e286d15.zip
Fix cases of discarding result from list API functions
Two cases violated list APIs by throwing away the return value. While the code was technically correct, it relied on internal knowledge of the list implementation, and the code wasn't really gaining anything that way. It is planned to make this a compiler warning in the future, so just fix these cases by assigning the return value properly. Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/e3753562-99cd-b65f-5aca-687dfd1ec2fc@2ndquadrant.com
Diffstat (limited to 'src/backend/commands/lockcmds.c')
-rw-r--r--src/backend/commands/lockcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index 2846ef3b7bd..098227656a8 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -266,7 +266,7 @@ LockViewRecurse(Oid reloid, LOCKMODE lockmode, bool nowait,
LockViewRecurse_walker((Node *) viewquery, &context);
- (void) list_delete_last(context.ancestor_views);
+ context.ancestor_views = list_delete_last(context.ancestor_views);
table_close(view, NoLock);
}