Re: [Qemu-devel] [PATCH 2/3] Hw: timer: Remove unnecessary variable

2015-09-25 Thread Peter Maydell
On 25 September 2015 at 01:37, Shraddha Barke wrote: > Compress lines and remove the variable ret. > > Change made using Coccinelle script > diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c > index 459c748..ba01050 100644 > --- a/hw/timer/tusb6010.c > +++ b/hw/timer/tusb6010.c > @@ -321,7 +

[Qemu-devel] [PATCH 2/3] Hw: timer: Remove unnecessary variable

2015-09-25 Thread Shraddha Barke
Compress lines and remove the variable ret. Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: