aboutsummaryrefslogtreecommitdiff
path: root/hw/char/etraxfs_ser.c
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-09-25 20:06:02 +0530
committerMichael Tokarev <mjt@tls.msk.ru>2015-10-08 19:46:47 +0300
commit65cb2a14cacbc08c754f3cb41436fe6ece46593a (patch)
tree3e88ad3795c5df6ee427f1ddae444d9510e1c1cb /hw/char/etraxfs_ser.c
parentbf5f78efed26054c2ce71e6f4c30ece13bf06e87 (diff)
hw: char: Remove unnecessary variable
Compress lines and remove the variable. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/char/etraxfs_ser.c')
-rw-r--r--hw/char/etraxfs_ser.c4
1 files changed, 1 insertions, 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)