From: Kurt Zeilenga Date: Mon, 11 Mar 2002 00:25:20 +0000 (+0000) Subject: Return EXIT_FAILURE if result code is not success. X-Git-Tag: OPENLDAP_REL_ENG_2_MP~360 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a5c4e9e9727b59e7daadec4a78b0ec49db7e8f6;p=openldap Return EXIT_FAILURE if result code is not success. --- diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index ea0977e833..838eb0288e 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -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; } diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index 1abe845ec1..fc7c44cee2 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -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; }