Commit e8b417e nss: remove unused label

1 file Authored and Committed by fidencio 5 days ago
nss: remove unused label

After 4937f2c6, Sumit noticed the following warning/breakage:

    make[2]: Leaving directory '/home/sbose/sssd/master_build/src/man'
    Making check in .
    make[2]: Entering directory '/home/sbose/sssd/master_build'
      CC       src/responder/nss/nss_protocol_grent.o
    ../src/responder/nss/nss_protocol_grent.c: In function 'nss_protocol_fill_initgr':
    ../src/responder/nss/nss_protocol_grent.c:409:1: error: label 'done' defined but not used [-Werror=unused-label]
     done:
     ^~~~
    cc1: all warnings being treated as errors
    Makefile:17808: recipe for target 'src/responder/nss/nss_protocol_grent.o' failed
    make[2]: *** [src/responder/nss/nss_protocol_grent.o] Error 1
    make[2]: Leaving directory '/home/sbose/sssd/master_build'

Also, while removing the label, by moving the error treatment to the if
block just before the existing one makes the code cleaner.

Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>

    
 1 @@ -403,15 +403,11 @@
 2               DEBUG(SSSDBG_MINOR_FAILURE,
 3                     "Failed to store initgroups %s (%s) in mem-cache [%d]: %s!\n",
 4                     rawname.str, domain->name, ret, sss_strerror(ret));
 5 +             sss_packet_set_size(packet, 0);
 6 +             return ret;
 7           }
 8       }
 9   
10 - done:
11 -     if (ret != EOK) {
12 -         sss_packet_set_size(packet, 0);
13 -         return ret;
14 -     }
15 - 
16       sss_packet_get_body(packet, &body, &body_len);
17       SAFEALIGN_COPY_UINT32(body, &num_results, NULL);
18       SAFEALIGN_SETMEM_UINT32(body + sizeof(uint32_t), 0, NULL); /* reserved */