summaryrefslogtreecommitdiff
path: root/gss-misc.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-03-29 12:14:47 +0100
committerMichael Biebl <biebl@debian.org>2008-03-29 12:14:47 +0100
commit9a7c5b2414911cfe8919b9f376cfc047259081b7 (patch)
tree11052b804d3eb489bab2c90c94c41fdd90732eda /gss-misc.c
parent12e8c69354614a03f06a8617f25d145ab091f504 (diff)
downloadrsyslog-9a7c5b2414911cfe8919b9f376cfc047259081b7.tar.gz
Imported Upstream version 1.21.0upstream/1.21.0
Diffstat (limited to 'gss-misc.c')
-rw-r--r--gss-misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gss-misc.c b/gss-misc.c
index 68197f0..7a09b1b 100644
--- a/gss-misc.c
+++ b/gss-misc.c
@@ -85,12 +85,12 @@ static int read_all(int fd, char *buf, unsigned int nbyte)
fd_set rfds;
struct timeval tv;
- FD_ZERO(&rfds);
- FD_SET(fd, &rfds);
- tv.tv_sec = 1;
- tv.tv_usec = 0;
-
for (ptr = buf; nbyte; ptr += ret, nbyte -= ret) {
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+
if ((ret = select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) <= 0
|| !FD_ISSET(fd, &rfds))
return ret;