From d978fa4832bbc5176e05edd05bcdf2452a8dded2 Mon Sep 17 00:00:00 2001 From: Giuseppe Lettieri Date: Thu, 4 Apr 2013 15:26:40 +0200 Subject: [PATCH] fix some warnings in tunproxy.c --- planetlab/exp-tool/tunproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planetlab/exp-tool/tunproxy.c b/planetlab/exp-tool/tunproxy.c index 0f3ab8190..024d886b4 100644 --- a/planetlab/exp-tool/tunproxy.c +++ b/planetlab/exp-tool/tunproxy.c @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) if (select(fd+s+1, &fdset,NULL,NULL,NULL) < 0) PERROR("select"); if (FD_ISSET(fd, &fdset)) { if (DEBUG) - write(1,">", 1); + if (write(1,">", 1) < 0) PERROR("write"); l = read(fd, buf, sizeof(buf)); if (l < 0) PERROR("read"); @@ -121,11 +121,11 @@ int main(int argc, char *argv[]) } if (FD_ISSET(s, &fdset)) { if (DEBUG) - write(1,"<", 1); + if (write(1,"<", 1) < 0) PERROR("write"); soutlen = sizeof(sout); l = recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr *)&sout, &soutlen); if (l == -1) { - write(1,"(", 1); + if (write(1,"(", 1) < 0) PERROR("write"); fprintf(stderr, "[%s,%d]", strerror(errno), l); continue; } -- 2.43.0