unsigned char bufin[MAX_SIZE];
ssize_t bufin_size = 0;
size_t bufin_rpos = 0;
- unsigned char *bufin_read;
+ unsigned char *bufin_read = NULL;
fd_set fds_w;
fd_set fds_r;
int max;
{
FD_ZERO (&fds_w);
FD_ZERO (&fds_r);
- bufin_read = NULL;
/*
* We are supposed to read and the buffer is empty
bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos);
if (-1 == bufin_size)
{
+ bufin_read = NULL;
if ( (errno == EINTR) ||
(errno == EAGAIN) )
continue;
}
if (0 == bufin_size)
{
+ bufin_read = NULL;
fprintf (stderr, "EOF on stdin\n");
return;
}