change type of result variables to ssize_t

These variables are being used to store the result of read/write calls,
which return a ssize_t value, which depending on platform can be bigger
than an int.
This commit is contained in:
André Fonseca 2023-08-29 10:11:10 +02:00 committed by Gerhard Sittig
parent 323881f8a4
commit fd20b0fc5a
1 changed files with 3 additions and 3 deletions

View File

@ -886,7 +886,7 @@ SP_API enum sp_return sp_blocking_write(struct sp_port *port, const void *buf,
unsigned char *ptr = (unsigned char *) buf;
struct timeout timeout;
fd_set fds;
int result;
ssize_t result;
timeout_start(&timeout, timeout_ms);
@ -1091,7 +1091,7 @@ SP_API enum sp_return sp_blocking_read(struct sp_port *port, void *buf,
unsigned char *ptr = (unsigned char *) buf;
struct timeout timeout;
fd_set fds;
int result;
ssize_t result;
timeout_start(&timeout, timeout_ms);
@ -1214,7 +1214,7 @@ SP_API enum sp_return sp_blocking_read_next(struct sp_port *port, void *buf,
size_t bytes_read = 0;
struct timeout timeout;
fd_set fds;
int result;
ssize_t result;
timeout_start(&timeout, timeout_ms);