Clean up secure_read()/secure_write() return type

The return type is ssize_t, not int, but some callers didn't handle
this properly.

The BIO callbacks are constrained by the OpenSSL API, so they take int
for the length and return int.  This is safe, since the return value
can't be greater than the input length.  To make it more clear that
this is intentional, cast the result of the
secure_read()/secure_write() call to int explicitly.

Reviewed-by: Heikki Linnakangas <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/flat/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7d45a6dc19743d999f5c83c95ad144a0f2eb6745

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c    | 4 ++--
src/backend/libpq/pqcomm.c               | 6 +++---
src/interfaces/libpq/fe-misc.c           | 4 ++--
src/interfaces/libpq/fe-secure-openssl.c | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)

Reply via email to