int lxc_monitor_read_fdset(struct pollfd *fds, nfds_t nfds, struct lxc_msg *msg,
int timeout)
{
- long i;
int ret;
ret = poll(fds, nfds, timeout * 1000);
/* Only read from the first ready fd, the others will remain ready for
* when this routine is called again.
*/
- for (i = 0; i < nfds; i++) {
+ for (size_t i = 0; i < nfds; i++) {
if (fds[i].revents != 0) {
fds[i].revents = 0;
ret = recv(fds[i].fd, msg, sizeof(*msg), 0);
* synced with the child process. the if-empty-statement
* construct is to quiet the warn-unused-result warning.
*/
- if (lxc_read_nointr(pipefd[0], &c, 1))
+ if (lxc_read_nointr(pipefd[0], &c, 1)) {
;
+ }
close(pipefd[0]);