From: Hallvard Furuseth Date: Sun, 4 Apr 1999 22:02:20 +0000 (+0000) Subject: Remove initialization of auto arrays X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~250 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1966222b50d0874717fe5d9ca777fac950a20981;p=openldap Remove initialization of auto arrays --- diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index c4245c62df..d86df2a964 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -144,7 +144,7 @@ make_salt (Salt * salt, unsigned int len) char * gen_pass (unsigned int len) { - const unsigned char autogen[] = + static const unsigned char autogen[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890.,"; int i; Salt salt; @@ -171,7 +171,7 @@ hash_none (const char *pw_in, Salt * salt) char * hash_crypt (const char *pw_in, Salt * salt) { - const unsigned char crypt64[] = + static const unsigned char crypt64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890./"; char *crypted_pw = NULL; Salt lsalt; @@ -614,9 +614,11 @@ main (int argc, char *argv[]) if (filtpattern) { char filter[BUFSIZ]; - LDAPMessage *result = NULL, *e = NULL; - char *attrs[3] = {"dn", NULL, NULL}; + LDAPMessage *result = NULL, *e; + char *attrs[3]; + attrs[0] = "dn"; attrs[1] = pwattr; + attrs[2] = NULL; /* search */ sprintf (filter, "%s", filtpattern);