Message ID | 1454496227-24376-1-git-send-email-ian.campbell@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Feb 03, 2016 at 10:43:47AM +0000, Ian Campbell wrote: > All other error paths in the infinite loop in handle_io use break, so > as to free resources. > > CID: 1351226 > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> > --- > tools/console/daemon/io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c > index e2e7a6b..34666c4 100644 > --- a/tools/console/daemon/io.c > +++ b/tools/console/daemon/io.c > @@ -1053,7 +1053,7 @@ void handle_io(void) > POLLIN|POLLPRI); > > if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) > - return; > + break; > now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); > > /* Re-calculate any event counter allowances & unblock > -- > 2.1.4 >
On Wed, 2016-02-03 at 10:49 +0000, Wei Liu wrote: > On Wed, Feb 03, 2016 at 10:43:47AM +0000, Ian Campbell wrote: > > All other error paths in the infinite loop in handle_io use break, so > > as to free resources. > > > > CID: 1351226 > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Acked-by: Wei Liu <wei.liu2@citrix.com> applied, thanks. > > > --- > > tools/console/daemon/io.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c > > index e2e7a6b..34666c4 100644 > > --- a/tools/console/daemon/io.c > > +++ b/tools/console/daemon/io.c > > @@ -1053,7 +1053,7 @@ void handle_io(void) > > POLLIN|POLLPRI); > > > > if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) > > - return; > > + break; > > now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / > > 1000000); > > > > /* Re-calculate any event counter allowances & unblock
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index e2e7a6b..34666c4 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -1053,7 +1053,7 @@ void handle_io(void) POLLIN|POLLPRI); if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) - return; + break; now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); /* Re-calculate any event counter allowances & unblock
All other error paths in the infinite loop in handle_io use break, so as to free resources. CID: 1351226 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- tools/console/daemon/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)