lib/krb5: reformat krb5_cc_set_default_name
Remove unnecessary levels of indentation. Switch the conditional from "(e == NULL)" to "(p == NULL)" since it the variable 'p' that is actually used to store the name of the default credential cache. Change-Id: Id884e2cd80b42e47d3c219ac3777161087467a14
This commit is contained in:
@@ -528,11 +528,11 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (e == NULL) {
|
if (p == NULL) {
|
||||||
e = p = _krb5_get_default_cc_name_from_registry(context);
|
p = _krb5_get_default_cc_name_from_registry(context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (e == NULL) {
|
if (p == NULL) {
|
||||||
e = krb5_config_get_string(context, NULL, "libdefaults",
|
e = krb5_config_get_string(context, NULL, "libdefaults",
|
||||||
"default_cc_name", NULL);
|
"default_cc_name", NULL);
|
||||||
if (e) {
|
if (e) {
|
||||||
@@ -540,7 +540,8 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (e == NULL) {
|
}
|
||||||
|
if (p == NULL) {
|
||||||
const krb5_cc_ops *ops = KRB5_DEFAULT_CCTYPE;
|
const krb5_cc_ops *ops = KRB5_DEFAULT_CCTYPE;
|
||||||
e = krb5_config_get_string(context, NULL, "libdefaults",
|
e = krb5_config_get_string(context, NULL, "libdefaults",
|
||||||
"default_cc_type", NULL);
|
"default_cc_type", NULL);
|
||||||
@@ -558,7 +559,6 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
context->default_cc_name_set = 0;
|
context->default_cc_name_set = 0;
|
||||||
} else {
|
} else {
|
||||||
p = strdup(name);
|
p = strdup(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user