25 Sep
2017
25 Sep
'17
9:52 p.m.
MISRA-C:2012, 15.4 - There should be no more than one break or goto statement used to terminate any iteration statement
reshuffle the code to use a single break
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/include/reef/wait.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/include/reef/wait.h b/src/include/reef/wait.h index 5523de7..c830a75 100644 --- a/src/include/reef/wait.h +++ b/src/include/reef/wait.h @@ -114,9 +114,7 @@ static inline int wait_for_completion_timeout(completion_t *comp) /* check for completion after every wake from IRQ */ while (1) {
- if (c->complete) - break; - if (c->timeout) + if (c->complete || c->timeout) break;
wait_for_interrupt(0);
--
2.11.0