From: Hallvard Furuseth Date: Sun, 27 Dec 1998 09:04:06 +0000 (+0000) Subject: Don't use initializers for auto arrays X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~856 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=77edee0260291351fa41d53bbb65d8c08c70568e;p=openldap Don't use initializers for auto arrays --- diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 70ed51609e..fe0b76998d 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -240,9 +240,8 @@ modify_dn (LDAP * ld, char *targetdn, char *pwattr, char *oldpw, int want_salt = salt->len && !salted; char *buf = NULL; char *hashed_pw = NULL; - char *strvals[2] = {NULL, NULL}; - LDAPMod mod; - LDAPMod *mods[2] = {&mod, NULL}; + char *strvals[2]; + LDAPMod mod, *mods[2]; if (!ld || !targetdn || !newpw) return (1); @@ -297,9 +296,12 @@ modify_dn (LDAP * ld, char *targetdn, char *pwattr, char *oldpw, } strvals[0] = buf; + strvals[1] = NULL; mod.mod_vals.modv_strvals = strvals; mod.mod_type = pwattr; mod.mod_op = LDAP_MOD_REPLACE; + mods[0] = &mod; + mods[1] =NULL; if (!noupdates && (ret = ldap_modify_s (ld, targetdn, mods)) != LDAP_SUCCESS) ldap_perror (ld, "ldap_modify_s");