HV: Logical conjunction needs brackets

The bracket is required when the level of precedence of
the operators is less than 13. Add the bracket to logical
conjunctions. The commit applys the rule to the files under

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-25 14:55:25 -07:00
committed by wenlingz
parent 6f1c5fa007
commit 2fbf70780e
22 changed files with 72 additions and 72 deletions

View File

@@ -357,7 +357,7 @@ void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg)
uint8_t *src8;
size_t slen = slen_arg;
if (slen == 0U || dmax == 0U || dmax < slen) {
if ((slen == 0U) || (dmax == 0U) || (dmax < slen)) {
ASSERT(false);
}
@@ -388,7 +388,7 @@ void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg)
/*make sure 8bytes-aligned for at least one addr.*/
if ((!MEM_ALIGNED_CHECK(src8, 8)) && (!MEM_ALIGNED_CHECK(dest8, 8))) {
for (; slen != 0U && (((uint64_t)src8) & 7UL) != 0UL; slen--) {
for (; (slen != 0U) && ((((uint64_t)src8) & 7UL) != 0UL); slen--) {
*dest8 = *src8;
dest8++;
src8++;
@@ -432,7 +432,7 @@ void *memset(void *base, uint8_t v, size_t n)
/*do the few bytes to get uint64_t alignment*/
count = n;
for (; count != 0U && ((uint64_t)dest_p & 7UL) != 0UL; count--) {
for (; (count != 0U) && (((uint64_t)dest_p & 7UL) != 0UL); count--) {
*dest_p = v;
dest_p++;
}