mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
tevent:testsuite: fix O3 errors unused result for read
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
This commit is contained in:
parent
1521e688b6
commit
22918a033b
@ -38,6 +38,15 @@
|
||||
|
||||
static int fde_count;
|
||||
|
||||
static void do_read(int fd, void *buf, size_t count)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
do {
|
||||
ret = read(fd, buf, count);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
}
|
||||
|
||||
static void fde_handler_read(struct tevent_context *ev_ctx, struct tevent_fd *f,
|
||||
uint16_t flags, void *private_data)
|
||||
{
|
||||
@ -48,7 +57,7 @@ static void fde_handler_read(struct tevent_context *ev_ctx, struct tevent_fd *f,
|
||||
#endif
|
||||
kill(getpid(), SIGALRM);
|
||||
|
||||
read(fd[0], &c, 1);
|
||||
do_read(fd[0], &c, 1);
|
||||
fde_count++;
|
||||
}
|
||||
|
||||
@ -72,7 +81,7 @@ static void fde_handler_read_1(struct tevent_context *ev_ctx, struct tevent_fd *
|
||||
#endif
|
||||
kill(getpid(), SIGALRM);
|
||||
|
||||
read(fd[1], &c, 1);
|
||||
do_read(fd[1], &c, 1);
|
||||
fde_count++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user