libvirt/src/security
Michal Privoznik 4a7a7808dc virSecuritySELinuxRestoreFileLabel: Adjust code pattern
Firstly, the following code pattern is harder to follow:

  if (func() < 0) {
      error();
  } else {
      /* success */
  }

We should put 'goto cleanup' into the error branch and move the
else branch one level up.
Secondly, 'rc' should really be named 'ret' because it holds
return value of the function. Not some intermediate value.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-18 17:12:53 +02:00
..
Makefile.inc.am
security_apparmor.c src: Make virStr*cpy*() functions return an int 2018-07-23 14:27:30 +02:00
security_apparmor.h
security_dac.c security_dac: Lock metadata when running transaction 2018-09-18 17:12:53 +02:00
security_dac.h
security_driver.c
security_driver.h security: Label the external swtpm with SELinux labels 2018-06-06 10:48:41 -04:00
security_manager.c security_manager: Introduce metadata locking APIs 2018-09-18 17:12:53 +02:00
security_manager.h security_manager: Introduce metadata locking APIs 2018-09-18 17:12:53 +02:00
security_nop.c
security_nop.h
security_selinux.c virSecuritySELinuxRestoreFileLabel: Adjust code pattern 2018-09-18 17:12:53 +02:00
security_selinux.h
security_stack.c security: Label the external swtpm with SELinux labels 2018-06-06 10:48:41 -04:00
security_stack.h
virt-aa-helper.c src: Make virStr*cpy*() functions return an int 2018-07-23 14:27:30 +02:00