For the sake of code clarity Signed-off-by: Igor Mitsyanko <i.mitsya...@samsung.com> --- hw/sd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd.c b/hw/sd.c index 338c125..63e458f 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -539,11 +539,11 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[66] = crc & 0xff; } -static inline int sd_wp_addr(SDState *sd, uint32_t addr) +static inline bool sd_wp_addr(SDState *sd, uint32_t addr) { unsigned int grp = addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); - return sd->wp_groups[grp >> 3] & (1 << (grp & 0x7)) ? 1 : 0; + return !!(sd->wp_groups[grp >> 3] & (1 << (grp & 0x7))); } static void sd_lock_command(SDState *sd) -- 1.7.4.1