HV: Bracket for the same level of precendence

The plus and minor have the same level of precedence. The Misra-C
considers it as a violation. Added brackets in between addition and
substraction oprators.

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-18 18:16:56 -07:00
committed by lijinxia
parent 91337da5a1
commit da0f28c6de
7 changed files with 13 additions and 12 deletions

View File

@@ -335,7 +335,7 @@ static int print_pow2(struct print_param *param,
/* assign parameter and apply width and precision */
param->vars.value = pos;
param->vars.valuelen = digitbuff + sizeof(digitbuff) - pos;
param->vars.valuelen = (digitbuff + sizeof(digitbuff)) - pos;
ret = format_number(param);
@@ -408,7 +408,7 @@ static int print_decimal(struct print_param *param, int64_t value)
/* assign parameter and apply width and precision */
param->vars.value = pos;
param->vars.valuelen = digitbuff + sizeof(digitbuff) - pos;
param->vars.valuelen = (digitbuff + sizeof(digitbuff)) - pos;
ret = format_number(param);