libvirt/src/test
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
..
Makefile.inc.am maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
test_driver.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
test_driver.h src/test: use #pragma once in headers 2019-06-19 17:12:31 +02:00
test-screenshot.png test: fix screenshot API impl 2016-12-08 10:57:32 +00:00