46084f2 conf: Improve virDomainChrTargetDefFormat()

Authored and Committed by Andrea Bolognani 6 years ago
    conf: Improve virDomainChrTargetDefFormat()
    
    Make the switch statement type-aware, avoid calling
    virDomainChrTargetTypeToString() more than once and check its
    return value before using it.
    
    Signed-off-by: Andrea Bolognani <abologna@redhat.com>
    Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
    
        
file modified
+22 -7