mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lxc: Fix return values of veth.c functions
Previously, the functions in src/lxc/veth.c could sometimes return positive values on failure rather than -1. This made accurate error reporting difficult, and led to one failure to catch an error in a calling function. This patch makes all the functions in veth.c consistently return 0 on success, and -1 on failure. It also fixes up the callers to the veth.c functions where necessary. Note that this patch may be related to the bug: https://bugzilla.redhat.com/show_bug.cgi?id=607496. It will not fix the bug, but should unveil what happens. * po/POTFILES.in - add veth.c, which previously had no translatable strings * src/lxc/lxc_controller.c * src/lxc/lxc_container.c * src/lxc/lxc_driver.c - fixup callers to veth.c, and remove error logs, as they are now done in veth.c * src/lxc/veth.c - make all functions consistently return -1 on error. * src/lxc/veth.h - use ATTRIBUTE_NONNULL to protect against NULL args.
This commit is contained in:
@@ -33,6 +33,7 @@ src/lxc/lxc_container.c
|
||||
src/lxc/lxc_conf.c
|
||||
src/lxc/lxc_controller.c
|
||||
src/lxc/lxc_driver.c
|
||||
src/lxc/veth.c
|
||||
src/network/bridge_driver.c
|
||||
src/node_device/node_device_driver.c
|
||||
src/node_device/node_device_hal.c
|
||||
|
||||
Reference in New Issue
Block a user