- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd21d61b
committed
Put back initialization of 'sslmode', to silence Coverity
Coverity pointed out that the function checks for conn->sslmode !=NULL, which implies that it might be NULL, but later we access itwithout a NULL-check anyway. It doesn't know that it is in fact alwaysinitialized earlier, in conninfo_add_defaults(), and hence theNULL-check is not necessary. However, there is a lot of distancebetween conninfo_add_defaults() and pqConnectOptions2(), so it's notsurprising that it doesn't see that. Put back the initialization code,as it existed before commit05fd30c, to silence the warning.In the long run, I'd like to refactor the libpq options handling andinitalization code. It seems silly to strdup() and copy strings, forthings like sslmode that have a limited set of possible values; itshould be an enum. But that's for another day.1 parentcd4b6af commitd21d61b
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1576 | 1576 |
| |
1577 | 1577 |
| |
1578 | 1578 |
| |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1579 | 1585 |
| |
1580 | 1586 |
| |
1581 | 1587 |
| |
|
0 commit comments
Comments
(0)