This series introduce VIR_AUTOCLOSE macro which can force close fd of the file
automatically when the fd goes out of scope. It's used to eliminate VIR_FORCE_CLOSE
in cleanup sections. The new macro consults VIR_AUTOFREE and VIR_AUTOPTR.
Shi Lei (6):
util: file: introduce VIR_AUTOCLOSE macro to close fd of the file
automatically
util: file: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
sections
util: netdevbridge: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in
cleanup sections
util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
sections
phyp: driver: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
sections
uml: conf: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE in cleanup
sections
src/phyp/phyp_driver.c | 29 ++---
src/uml/uml_conf.c | 13 +-
src/util/virfile.c | 21 +--
src/util/virfile.h | 20 ++-
src/util/virnetdev.c | 253 +++++++++++++------------------------
src/util/virnetdevbridge.c | 120 ++++++------------
6 files changed, 163 insertions(+), 293 deletions(-)
--
2.17.1