Преглед изворни кода

610281 - fix coverity Defect Type: Control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=610281

11817 DEADCODE Triaged Unassigned Bug Moderate Fix Required
NSUniqueAttr_Init() ds/ldap/servers/plugins/uiduniq/uid.c

Comment:
NSUniqueAttr_Init declared err twice.  One at the top and another
in BEGIN - END (do - while loop).  The second err in the do - while
loop is trashed when it gets out of the loop.  Regardless of the
result in the do - while loop, err = 0 (success) was returned to
the caller.

We are removing the second err in the BEGIN (== do - while) scope.
945 int err;
Noriko Hosoi пре 15 година
родитељ
комит
d1946d8f5c
1 измењених фајлова са 0 додато и 1 уклоњено
  1. 0 1
      ldap/servers/plugins/uiduniq/uid.c

+ 0 - 1
ldap/servers/plugins/uiduniq/uid.c

@@ -942,7 +942,6 @@ NSUniqueAttr_Init(Slapi_PBlock *pb)
   int err = 0;
 
   BEGIN
-    int err;
     int argc;
     char **argv;