[libvirt] [PATCH 24/24] maint: replace remaining virLib*Error with better names
John Ferlan
jferlan at redhat.com
Fri Jan 3 02:09:49 UTC 2014
On 12/28/2013 11:11 AM, Eric Blake wrote:
> Finish the cleanup; all uses of virLib*Error have now been
> converted to more canonical conventions.
>
> * src/libvirt.c: Use virReportError in remaining errors.
> (virLibConnError, virLibDomainError): Delete unused macros.
> * cfg.mk (msg_gen_function): Drop unused names.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> cfg.mk | 10 ----
> src/libvirt.c | 158 +++++++++++++++++++++++++++-------------------------------
> 2 files changed, 74 insertions(+), 94 deletions(-)
>
For a few less lines create a "virDriverCheckTabMaxReturn()" to replace
each of the:
if (vir*DriverTabCount >= MAX_DRIVERS) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Too many drivers, cannot register %s"),
driver->name);
return -1;
}
ACK
John
More information about the libvir-list
mailing list