A void pointer asks for being casted, so C allows for omitting the explicit cast. Take advantage of that.
Signed-off-by: Bernhard Beschow <[email protected]> --- hw/char/serial.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index adbd1d1d4a..0f2e79dfba 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -715,7 +715,7 @@ static const VMStateDescription vmstate_serial_thr_ipending = { static bool serial_tsr_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return s->tsr_retry != 0; } @@ -734,7 +734,7 @@ static const VMStateDescription vmstate_serial_tsr = { static bool serial_recv_fifo_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return !fifo8_is_empty(&s->recv_fifo); } @@ -752,7 +752,7 @@ static const VMStateDescription vmstate_serial_recv_fifo = { static bool serial_xmit_fifo_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return !fifo8_is_empty(&s->xmit_fifo); } @@ -769,7 +769,7 @@ static const VMStateDescription vmstate_serial_xmit_fifo = { static bool serial_fifo_timeout_timer_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return timer_pending(s->fifo_timeout_timer); } @@ -786,7 +786,7 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = { static bool serial_timeout_ipending_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return s->timeout_ipending != 0; } @@ -803,7 +803,7 @@ static const VMStateDescription vmstate_serial_timeout_ipending = { static bool serial_poll_needed(void *opaque) { - SerialState *s = (SerialState *)opaque; + SerialState *s = opaque; return s->poll_msl >= 0; } -- 2.53.0
