Check return value of write() in regress.c

This commit is contained in:
Nick Mathewson 2012-06-29 12:47:03 -04:00
parent 59f21fd8fc
commit c8009d2985

View File

@ -1357,8 +1357,8 @@ static void
write_a_byte_cb(evutil_socket_t fd, short what, void *arg)
{
char buf[] = "x";
write(fd, buf, 1);
++n_write_a_byte_cb;
if (write(fd, buf, 1) == 1)
++n_write_a_byte_cb;
}
static void
read_and_drain_cb(evutil_socket_t fd, short what, void *arg)