mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Explicitly ignore guaranteed-true result from pgstat_lock_entry().
With nowait passed as false, pgstat_lock_entry() must return true so there's no need to check its result. Coverity seems unconvinced of this, so whack it upside the head with a (void) cast.
This commit is contained in:
@ -920,7 +920,7 @@ pgstat_reset_entry(PgStat_Kind kind, Oid dboid, Oid objoid, TimestampTz ts)
|
|||||||
if (!entry_ref || entry_ref->shared_entry->dropped)
|
if (!entry_ref || entry_ref->shared_entry->dropped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pgstat_lock_entry(entry_ref, false);
|
(void) pgstat_lock_entry(entry_ref, false);
|
||||||
shared_stat_reset_contents(kind, entry_ref->shared_stats, ts);
|
shared_stat_reset_contents(kind, entry_ref->shared_stats, ts);
|
||||||
pgstat_unlock_entry(entry_ref);
|
pgstat_unlock_entry(entry_ref);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user