[PATCH v2 0/4] virsh: refactor unnecessary variables and else branch

Kristina Hanicova posted 4 patches 2 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1632440795.git.khanicov@redhat.com
tools/virsh-host.c      | 25 +++++-----------
tools/virsh-interface.c | 65 ++++++++++++++++++-----------------------
tools/virsh-network.c   | 47 +++++++++++++----------------
tools/virsh-nodedev.c   | 32 ++++++++------------
tools/virsh-nwfilter.c  | 15 +++++-----
tools/virsh-util.c      |  3 +-
6 files changed, 76 insertions(+), 111 deletions(-)
[PATCH v2 0/4] virsh: refactor unnecessary variables and else branch
Posted by Kristina Hanicova 2 years, 7 months ago
This is partially v2 of:
https://listman.redhat.com/archives/libvir-list/2021-September/msg00731.html

Diff to v1:
* split changes into smaller patches

Kristina Hanicova (4):
  virsh: remove variable 'ret' and use early return if possible
  virsh: remove variable 'ret' in cmdVersion()
  virsh: remove variable 'ret' and 'inactive'
  virsh: util: remove 'else' branch after return

 tools/virsh-host.c      | 25 +++++-----------
 tools/virsh-interface.c | 65 ++++++++++++++++++-----------------------
 tools/virsh-network.c   | 47 +++++++++++++----------------
 tools/virsh-nodedev.c   | 32 ++++++++------------
 tools/virsh-nwfilter.c  | 15 +++++-----
 tools/virsh-util.c      |  3 +-
 6 files changed, 76 insertions(+), 111 deletions(-)

-- 
2.31.1

Re: [PATCH v2 0/4] virsh: refactor unnecessary variables and else branch
Posted by Michal Prívozník 2 years, 7 months ago
On 9/24/21 1:49 AM, Kristina Hanicova wrote:
> This is partially v2 of:
> https://listman.redhat.com/archives/libvir-list/2021-September/msg00731.html
> 
> Diff to v1:
> * split changes into smaller patches
> 
> Kristina Hanicova (4):
>   virsh: remove variable 'ret' and use early return if possible
>   virsh: remove variable 'ret' in cmdVersion()
>   virsh: remove variable 'ret' and 'inactive'
>   virsh: util: remove 'else' branch after return
> 
>  tools/virsh-host.c      | 25 +++++-----------
>  tools/virsh-interface.c | 65 ++++++++++++++++++-----------------------
>  tools/virsh-network.c   | 47 +++++++++++++----------------
>  tools/virsh-nodedev.c   | 32 ++++++++------------
>  tools/virsh-nwfilter.c  | 15 +++++-----
>  tools/virsh-util.c      |  3 +-
>  6 files changed, 76 insertions(+), 111 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal