diff options
| author | Ned T. Crigler <crigler@users.sourceforge.net> | 2012-07-01 21:26:10 +0000 |
|---|---|---|
| committer | Ned T. Crigler <crigler@users.sourceforge.net> | 2012-07-01 21:26:10 +0000 |
| commit | aeb60e6d041cf1995233f5cb6af64fa880200e84 (patch) | |
| tree | 04ef3508e69162990539af576cb43fb85f960ea1 /master.c | |
| parent | 637bafd129d781516f9b1efbccd326484efecdb3 (diff) | |
Use ssize_t for the return type of read/write instead of int.
Diffstat (limited to 'master.c')
| -rw-r--r-- | master.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -220,7 +220,7 @@ static void pty_activity(int s) { unsigned char buf[BUFSIZE]; - int len; + ssize_t len; struct client *p; fd_set readfds, writefds; int highest_fd, nclients; @@ -268,7 +268,7 @@ top: /* Send the data out to the clients. */ for (p = clients, nclients = 0; p; p = p->next) { - int written; + ssize_t written; if (!FD_ISSET(p->fd, &writefds)) continue; @@ -276,7 +276,7 @@ top: written = 0; while (written < len) { - int n = write(p->fd, buf + written, len - written); + ssize_t n = write(p->fd, buf + written, len - written); if (n > 0) { @@ -330,7 +330,7 @@ control_activity(int s) static void client_activity(struct client *p) { - int len; + ssize_t len; struct packet pkt; /* Read the activity. */ @@ -565,7 +565,7 @@ master_main(char **argv, int waitattach) if (fd[0] != -1) { char buf[1024]; - int len; + ssize_t len; close(fd[1]); len = read(fd[0], buf, sizeof(buf)); |
