OSDN Git Service

ppc: Fix a warning in bcdcfz code and improve BCD_DIG_BYTE macro
authorJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Wed, 11 Jan 2017 21:11:25 +0000 (19:11 -0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 30 Jan 2017 23:10:14 +0000 (10:10 +1100)
commit365206aeb3d0bb72043d157088a0ebcfaad851f7
tree468a4882de8cd70c60224ab3ea0c3092a07eb60e
parent0dfe952dc5c2921488a1172407857d5bb81d17a4
ppc: Fix a warning in bcdcfz code and improve BCD_DIG_BYTE macro

This commit fixes a warning in the code "(i * 2) ? .. : ..", which
should be better as "i ? .. : ..", and improves the BCD_DIG_BYTE
macro by placing parentheses around its argument to avoid possible
expansion issues like: BCD_DIG_BYTE(i + j).

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/int_helper.c