mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
HV: add the missing brackets to loop body
MISRA-C requires the use of brackets, even when there is only one statement in the loop body. Signed-off-by: Ying Liu <ying2.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -469,8 +469,9 @@ int do_print(const char *fmt, struct print_param *param,
|
||||
/* mark the current position and search the next '%' */
|
||||
start = fmt;
|
||||
|
||||
while (((*fmt) != 0) && (*fmt != '%'))
|
||||
while (((*fmt) != 0) && (*fmt != '%')) {
|
||||
fmt++;
|
||||
}
|
||||
|
||||
/*
|
||||
* pass all characters until the next '%' to the emit function.
|
||||
|
@@ -150,8 +150,9 @@ int atoi(const char *str)
|
||||
|
||||
char *strchr(const char *s, int ch)
|
||||
{
|
||||
while ((*s != 0) && (*s != ch))
|
||||
while ((*s != 0) && (*s != ch)) {
|
||||
++s;
|
||||
}
|
||||
|
||||
return ((*s) != 0) ? ((char *)s) : 0;
|
||||
}
|
||||
|
@@ -15,6 +15,6 @@ void udelay(uint32_t us)
|
||||
dest_tsc = rdtsc() + delta_tsc;
|
||||
|
||||
/* Loop until time expired */
|
||||
while
|
||||
(rdtsc() < dest_tsc);
|
||||
while (rdtsc() < dest_tsc) {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user