0857468 pyhbac: Fix warning Wsign-compare

Authored and Committed by lslebodn 7 years ago
    pyhbac: Fix warning Wsign-compare
    
    src/python/pyhbac.c: In function ‘HbacRuleElement_repr’:
    src/python/pyhbac.c:506:59: error: comparison between
        signed and unsigned integer expressions [-Werror=sign-compare]
         if (strnames == NULL || strgroups == NULL || category == -1) {
                                                               ^
    src/python/pyhbac.c: In function ‘HbacRuleElement_to_native’:
    src/python/pyhbac.c:614:51: error: comparison between
        signed and unsigned integer expressions [-Werror=sign-compare]
         if (!el->names || !el->groups || el->category == -1) {
                                                       ^
    
    The static function native_category had type of terurn value uint32_t
    But it also could return -1 which indicated an error.
    
    It's better to don't mix return code with returned value.
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    (cherry picked from commit f47a339d7794cd5a24d368b3b3640452686e45a5)
    
        
file modified
+11 -7