new_cred->rfc_mech = cred->rfc_mech;
new_cred->tgt_expire = cred->tgt_expire;
- if (code = krb5_copy_principal(context, cred->princ,
- &new_cred->princ)) {
+ code = krb5_copy_principal(context, cred->princ, &new_cred->princ);
+ if (code) {
free(new_cred);
*minor_status = code;
ktboth[sizeof(ktboth) - 1] = '\0';
strncat(ktboth, ":", sizeof(ktboth) - 1 - strlen(ktboth));
- if (code = krb5_kt_get_name(context, cred->keytab,
- ktboth+strlen(ktboth),
- sizeof(ktboth)-strlen(ktboth))) {
+ code = krb5_kt_get_name(context, cred->keytab,
+ ktboth+strlen(ktboth),
+ sizeof(ktboth)-strlen(ktboth));
+ if (code) {
krb5_free_principal(context, new_cred->princ);
free(new_cred);
return(GSS_S_FAILURE);
}
- if (code = krb5_kt_resolve(context, ktboth, &new_cred->keytab)) {
+ code = krb5_kt_resolve(context, ktboth, &new_cred->keytab);
+ if (code) {
krb5_free_principal(context, new_cred->princ);
free(new_cred);
strncat(ccboth, ":", sizeof(ccboth) - 1 - strlen(ccboth));
strncat(ccboth, ccname, sizeof(ccboth) - 1 - strlen(ccboth));
- if (code = krb5_cc_resolve(context, ccboth, &new_cred->ccache)) {
+ code = krb5_cc_resolve(context, ccboth, &new_cred->ccache);
+ if (code) {
if (new_cred->rcache)
krb5_rc_close(context, new_cred->rcache);
if (new_cred->keytab)