From 3a5c4e9e9727b59e7daadec4a78b0ec49db7e8f6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 11 Mar 2002 00:25:20 +0000 Subject: [PATCH] Return EXIT_FAILURE if result code is not success. --- clients/tools/ldappasswd.c | 4 ++-- clients/tools/ldapwhoami.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.39.5