mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
10f94828ea
So far we are repeating the following lines over and over: if (!(virSomeObjectClass = virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose))) return -1; While this works, it is impossible to do some checking. Firstly, the class name (the 2nd argument) doesn't match the name in the code in all cases (the 3rd argument). Secondly, the current style is needlessly verbose. This commit turns example into following: if (!(VIR_CLASS_NEW(virSomeObject, virClassForObject))) return -1; Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
||
---|---|---|
.. | ||
log_daemon_config.c | ||
log_daemon_config.h | ||
log_daemon_dispatch.c | ||
log_daemon_dispatch.h | ||
log_daemon.c | ||
log_daemon.h | ||
log_handler.c | ||
log_handler.h | ||
log_manager.c | ||
log_manager.h | ||
log_protocol.x | ||
Makefile.inc.am | ||
test_virtlogd.aug.in | ||
virtlogd-admin.socket.in | ||
virtlogd.aug | ||
virtlogd.conf | ||
virtlogd.init.in | ||
virtlogd.pod | ||
virtlogd.service.in | ||
virtlogd.socket.in | ||
virtlogd.sysconf |