libvirt/src/libxl
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_libxl.aug libxl: do not enable nested HVM unless global nested_hvm option enabled 2018-04-17 21:15:27 -06:00
libxl_capabilities.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
libxl_capabilities.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl_conf.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
libxl_conf.h libxl: use G_GNUC_UNUSED 2019-10-15 11:25:23 +02:00
libxl_domain.c libxl_domain: Use g_autoptr for libxlDriverConfig 2019-10-22 15:49:53 +02:00
libxl_domain.h Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK 2019-10-15 11:25:22 +02:00
libxl_driver.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
libxl_driver.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl_logger.c Use G_GNUC_PRINTF instead of ATTRIBUTE_FMT_PRINTF 2019-10-15 16:14:18 +02:00
libxl_logger.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl_migration.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
libxl_migration.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl.conf libxl: do not enable nested HVM unless global nested_hvm option enabled 2018-04-17 21:15:27 -06:00
Makefile.inc.am build: fix use of $(AUG_GENTEST) as a dependency 2019-10-18 13:54:03 +01:00
test_libvirtd_libxl.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtxend.service.in libxl: introduce virtxend daemon 2019-08-09 14:06:31 +01:00
xen_common.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
xen_common.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xen_xl.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
xen_xl.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xen_xm.c libxl: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:56 +02:00
xen_xm.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xenxs_private.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00