libvirt/src/lxc
Michal Privoznik 3b4df5d350 Drop needless ret variable
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 f;
  identifier ret;
  @@
  -T ret = C;
   ... when != ret
  -ret = f;
  -return ret;
  +return f;

Afterwards I needed to fix a few places, e.g. comment in
virDomainNetIPParseXML() was removed too because coccinelle
thinks it refers to @ret while in fact it doesn't. Also in few
places it replaced @ret declaration with a few spaces instead of
removing the line. But nothing terribly wrong.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2019-10-24 08:10:37 +02:00
..
libvirtd_lxc.aug
lxc_cgroup.c lxc: use G_GNUC_UNUSED 2019-10-15 11:25:23 +02:00
lxc_cgroup.h
lxc_conf.c lxc: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
lxc_conf.h src: honour the RUNSTATEDIR variable in all code 2019-08-27 10:23:13 +01:00
lxc_container.c lxc: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
lxc_container.h
lxc_controller.c lxc: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
lxc_domain.c lxc: use G_GNUC_UNUSED 2019-10-15 11:25:23 +02:00
lxc_domain.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
lxc_driver.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
lxc_driver.h
lxc_fuse.c lxc: use G_GNUC_UNUSED 2019-10-15 11:25:23 +02:00
lxc_fuse.h
lxc_hostdev.c
lxc_hostdev.h
lxc_monitor_protocol.x
lxc_monitor.c Use G_N_ELEMENTS instead of ARRAY_CARDINALITY 2019-10-15 16:14:19 +02:00
lxc_monitor.h
lxc_native.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
lxc_native.h
lxc_process.c lxc: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
lxc_process.h
lxc.conf
Makefile.inc.am build: fix use of $(AUG_GENTEST) as a dependency 2019-10-18 13:54:03 +01:00
test_libvirtd_lxc.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtlxcd.service.in lxc: introduce virtlxcd daemon 2019-08-09 14:06:31 +01:00