Re: [libvirt] [PATCH] Drop needless ret variable

2019-10-23 Thread Michal Prívozník
On 10/23/19 6:47 PM, Daniel Henrique Barboza wrote: > > > On 10/23/19 10:39 AM, Michal Privoznik wrote: >> In few places we have the following code pattern: >> >>    int ret; >>    ... /* @ret is not accessed here */ >>    ret = f(...); >>    return ret; >> >> This pattern can be written less ver

Re: [libvirt] [PATCH] Drop needless ret variable

2019-10-23 Thread Daniel Henrique Barboza
On 10/23/19 10:39 AM, Michal Privoznik wrote: In few places we have the following code pattern: int ret; ... /* @ret is not accessed here */ ret = f(...); return ret; This pattern can be written less verbose: ... return f(...); This patch was generated with following cocc

[libvirt] [PATCH] Drop needless ret variable

2019-10-23 Thread Michal Privoznik
In few places we have the following code pattern: int ret; ... /* @ret is not accessed here */ ret = f(...); return ret; This pattern can be written less verbose: ... return f(...); This patch was generated with following coccinelle spatch: @@ type T; constant C; expression

[libvirt] [PATCH] Drop needless @ret variable

2019-10-17 Thread Michal Privoznik
In few places we have the following code pattern: int ret; ... /* @ret is not accessed here */ ret = f(...); return ret; This pattern can be written less verbose: ... return f(...); This patch was generated with following coccinelle spatch: @@ type T; constant C; expression