[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 24/24] maint: replace remaining virLib*Error with better names




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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]