libvirt/src/locking
Michal Privoznik 857df2fe50 lib: Drop intermediary return variables
In a few places we declare a variable (which is optionally
followed by a code not touching it) then set the variable to a
value and return the variable immediately. It's obvious that the
variable is needless and the value can be returned directly
instead.

This patch was generated using this semantic patch:

  @@
  type T;
  identifier ret;
  expression E;
  @@
  - T ret;
  ... when != ret
      when strict
  - ret = E;
  - return ret;
  + return E;

After that I fixed couple of formatting issues because coccinelle
formatted some lines differently than our coding style.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-10-25 12:48:46 +02:00
..
domain_lock.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
domain_lock.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
libvirt_lockd.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
libvirt_sanlock.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
lock_daemon_config.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_daemon_config.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_daemon_dispatch.c virtlockd: Don't report error if lockspace exists 2021-07-07 09:40:38 -06:00
lock_daemon_dispatch.h src/locking: use #pragma once in headers 2019-06-19 17:12:30 +02:00
lock_daemon.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
lock_daemon.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_driver_lockd.c virtlockd: Don't report error if lockspace exists 2021-07-07 09:40:38 -06:00
lock_driver_lockd.h src/locking: use #pragma once in headers 2019-06-19 17:12:30 +02:00
lock_driver_nop.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_driver_nop.h src/locking: use #pragma once in headers 2019-06-19 17:12:30 +02:00
lock_driver_sanlock.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
lock_driver.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_manager.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_manager.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_protocol.x
lockd.conf
meson.build meson: Whitespace tweaks 2021-06-01 14:30:39 +02:00
sanlock_helper.c Remove use of variables passed only to 'VIR_FREE' 2020-06-15 10:27:37 +02:00
sanlock.conf
test_libvirt_lockd.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
test_libvirt_sanlock.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
test_virtlockd.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtlockd-admin.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
virtlockd.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
virtlockd.conf util: drop support for stack traces with logging 2019-10-18 16:25:17 +01:00
virtlockd.init.in Add virtlockd and virtlogd init scripts 2020-02-22 17:11:54 +01:00
virtlockd.service.in src: fix misc spelling errors reported by codespell 2020-10-05 10:28:41 +01:00
virtlockd.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
virtlockd.sysconf systemd: Tweak existing sysconf files 2020-04-03 11:50:35 +02:00