From 65cb2a14cacbc08c754f3cb41436fe6ece46593a Mon Sep 17 00:00:00 2001 From: Shraddha Barke Date: Fri, 25 Sep 2015 20:06:02 +0530 Subject: [PATCH] hw: char: Remove unnecessary variable Compress lines and remove the variable. Signed-off-by: Shraddha Barke Signed-off-by: Michael Tokarev --- hw/char/etraxfs_ser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c index 857c13621c..562021e28b 100644 --- a/hw/char/etraxfs_ser.c +++ b/hw/char/etraxfs_ser.c @@ -182,15 +182,13 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size) static int serial_can_receive(void *opaque) { ETRAXSerial *s = opaque; - int r; /* Is the receiver enabled? */ if (!(s->regs[RW_REC_CTRL] & (1 << 3))) { return 0; } - r = sizeof(s->rx_fifo) - s->rx_fifo_len; - return r; + return sizeof(s->rx_fifo) - s->rx_fifo_len; } static void serial_event(void *opaque, int event) -- 2.11.4.GIT