mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
Return EXIT_FAILURE if result code is not success.
This commit is contained in:
parent
c488c6cdfa
commit
3a5c4e9e97
2 changed files with 4 additions and 4 deletions
|
|
@ -101,7 +101,7 @@ main( int argc, char *argv[] )
|
|||
LDAP *ld = NULL;
|
||||
struct berval *bv = NULL;
|
||||
|
||||
int id, code;
|
||||
int id, code = LDAP_OTHER;
|
||||
LDAPMessage *res;
|
||||
char *matcheddn = NULL, *text = NULL, **refs = NULL;
|
||||
char *retoid = NULL;
|
||||
|
|
@ -781,5 +781,5 @@ skip:
|
|||
/* disconnect from server */
|
||||
ldap_unbind (ld);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ main( int argc, char *argv[] )
|
|||
LDAP *ld = NULL;
|
||||
struct berval *bv = NULL;
|
||||
|
||||
int id, code;
|
||||
int id, code = LDAP_OTHER;
|
||||
LDAPMessage *res;
|
||||
char *matcheddn = NULL, *text = NULL, **refs = NULL;
|
||||
char *retoid = NULL;
|
||||
|
|
@ -714,5 +714,5 @@ skip:
|
|||
/* disconnect from server */
|
||||
ldap_unbind (ld);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue