Skip to content

Improve code quality - #1169

Merged
eulerto merged 4 commits into
pgbouncer:masterfrom
eulerto:coverity-issues-1
Sep 17, 2024
Merged

Improve code quality#1169
eulerto merged 4 commits into
pgbouncer:masterfrom
eulerto:coverity-issues-1

Conversation

@eulerto

@eulerto eulerto commented Sep 17, 2024

Copy link
Copy Markdown
Member

These issues were pointed out by Coverity.

Pointed out by Coverity.
event_add() returns an integer that is ignored by the current code. Use
the return to provide information about an event_add() issue.

Pointed out by Coverity.
The find_database() function might return NULL.  However, this is not
true for this code path because there is always a database called
"pgbouncer". Rearrange the code to only call get_pool() if the db
variable is not null.

Pointed out by Coverity.
It only makes sense to test if a variable (ident) is NULL before using
it. There is a similar code path in hba_load_rules().

Pointed out by Coverity.
@eulerto eulerto mentioned this pull request Sep 17, 2024
@eulerto
eulerto merged commit a6c3b31 into pgbouncer:master Sep 17, 2024
@eulerto
eulerto deleted the coverity-issues-1 branch July 22, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants