5b8f64f Refactor some conditions

2 files Authored by mzidek 8 years ago, Committed by lslebodn 8 years ago,
    Refactor some conditions
    
    Conditions with get_next_domain were a little
    confusing for coverity (but also for developers'
    eyes).
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    (cherry picked from commit e563de9203be581acc30c7794f568ae40d22bee0)