mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-29 00:55:22 +00:00
3b4df5d350
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> |
||
---|---|---|
.. | ||
libvirtd_libxl.aug | ||
libxl_capabilities.c | ||
libxl_capabilities.h | ||
libxl_conf.c | ||
libxl_conf.h | ||
libxl_domain.c | ||
libxl_domain.h | ||
libxl_driver.c | ||
libxl_driver.h | ||
libxl_logger.c | ||
libxl_logger.h | ||
libxl_migration.c | ||
libxl_migration.h | ||
libxl.conf | ||
Makefile.inc.am | ||
test_libvirtd_libxl.aug.in | ||
virtxend.service.in | ||
xen_common.c | ||
xen_common.h | ||
xen_xl.c | ||
xen_xl.h | ||
xen_xm.c | ||
xen_xm.h | ||
xenxs_private.h |