kadmin: add_one_principal avoid shadow warning

8dcc5e617b
("kadmin: add_one_principal refactor") made 'princ_name' a
top-level variable.  This precludes the need to declare
subsequent block-level variables with the same name.

Change-Id: I4bf9e54b49a0e366ed4cd39920d3fe58439beb33
This commit is contained in:
Jeffrey Altman
2022-01-21 10:32:48 -05:00
parent 04527412e3
commit dafbfa666f

View File

@@ -138,7 +138,6 @@ add_one_principal(const char *name,
random_password (pwbuf, sizeof(pwbuf));
password = pwbuf;
} else if(password == NULL) {
char *princ_name;
char *prompt;
int aret;
@@ -146,7 +145,6 @@ add_one_principal(const char *name,
if (ret)
goto out;
aret = asprintf (&prompt, "%s's Password: ", princ_name);
free (princ_name);
if (aret == -1) {
ret = ENOMEM;
krb5_set_error_message(context, ret, "out of memory");