in_ccache_iterator->cursor,
&ccache);
- if (!terr) {
+ if (ccache) {
err = kim_ccache_create_from_krb5_ccache (out_ccache,
in_ccache_iterator->context,
ccache);
- } else if (terr == KRB5_CC_END) {
- *out_ccache = NULL; /* no more ccaches */
-
} else {
+ *out_ccache = NULL; /* no more ccaches */
+ }
+ if (terr && terr != KRB5_CC_END) {
err = krb5_error (in_ccache_iterator->context, terr);
}
}
kim_string name = krb5_cc_get_name (in_ccache->context,
in_ccache->ccache);
- err = kim_ccache_create_resolve_name (out_display_name, type, name);
+ err = kim_ccache_create_resolve_name (out_display_name, name, type);
}
return check_error (err);