ia64/kernel/unwind.c:907: possible ternary operator problem ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

[linux-3.19-rc3/arch/ia64/kernel/unwind.c:907]: (style) Same expression in both branches of ternary operator.

Source code is

int base = (i < 4) ? UNW_REG_F2 : UNW_REG_F16 - 4;

but

    UNW_REG_F2, UNW_REG_F3, UNW_REG_F4, UNW_REG_F5,
    UNW_REG_F16, UNW_REG_F17, UNW_REG_F18, UNW_REG_F19,

so UNW_REG_F16 is only 4 bigger than UNW_REG_F2.

Suggest code rework. Adding some () to make the expression more
clear might also help.

Regards

David Binderman

 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux