Avoid (s)size_t for portability

This commit is contained in:
Kim Woelders
2018-10-11 14:52:55 +02:00
parent 2d993212c5
commit 44ddf67386
3 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -62,7 +62,7 @@ typedef struct {
struct pollfd fds[3];
char net_buf[NET_BUF_SIZE];
size_t net_cnt;
int net_cnt;
char tmp_buf[TMP_BUF_SIZE];
struct termios tio;
@@ -191,7 +191,7 @@ static void _update_notify(ttynvt_t * tty, struct fuse_pollhandle *ph)
static void *_read_net(void *arg)
{
ttynvt_t *tty = (ttynvt_t *) arg;
ssize_t res;
int res;
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
@@ -324,7 +324,7 @@ static int _srv_read(void *cctx, int timeout)
NET_BUF_SIZE - tty->net_cnt);
if (res <= 0)
return res;
tty->net_cnt += (size_t) res;
tty->net_cnt += res;
res = telnet_rx(tty->tn, tty->net_buf, &tty->net_cnt);
if (res == 0)
break;
@@ -516,7 +516,7 @@ ttynvt_write(fuse_req_t req, const char *data, size_t size, off_t off,
struct fuse_file_info *info)
{
ttynvt_t *tty = (ttynvt_t *) (uintptr_t) info->fh;
ssize_t res;
int res;
if (size == 0)