Eliminate a few harmless dead stores.

Quiets warnings from Infer.
This commit is contained in:
Todd C. Miller
2022-11-22 11:18:24 -07:00
parent 2f97da316e
commit f066ff9e01
13 changed files with 19 additions and 19 deletions

View File

@@ -204,7 +204,7 @@ static int
sudo_ldap_init(LDAP **ldp, const char *host, int port)
{
LDAP *ld;
int ret = LDAP_CONNECT_ERROR;
int ret;
debug_decl(sudo_ldap_init, SUDOERS_DEBUG_LDAP);
#ifdef HAVE_LDAPSSL_INIT
@@ -281,8 +281,10 @@ sudo_ldap_init(LDAP **ldp, const char *host, int port)
ret = ldap_set_option(ld, LDAP_OPT_HOST_NAME, host);
#else
DPRINTF2("ldap_init(%s, %d)", host, port);
if ((ld = ldap_init((char *)host, port)) == NULL)
if ((ld = ldap_init((char *)host, port)) == NULL) {
ret = LDAP_LOCAL_ERROR;
goto done;
}
ret = LDAP_SUCCESS;
#endif
}