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 <[email protected]>
> ---
>  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

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to