Skip to content

Commit cb064b1

Browse files
yuchuyanglijinxia
authored andcommitted
HV: Do not return expression contains subexpression
Operation should be done outside return expression. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
1 parent eb7cf14 commit cb064b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hypervisor/debug/printf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ static int charout(int cmd, const char *s, int sz, void *hnd)
2323
else
2424
s += console_write(s, sz);
2525

26-
return (*nchars += (s - p));
26+
*nchars += (s - p);
27+
return *nchars;
2728
}
2829
/* fill mode */
2930
else {

0 commit comments

Comments
 (0)