From: Ken Raeburn Date: Fri, 13 Oct 2006 21:08:07 +0000 (+0000) Subject: Use 'const' with krb5_get_error_message X-Git-Tag: krb5-1.6-alpha1~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e73b515ad5d073ab4da770a1281bd36d0d09a72c;p=krb5.git Use 'const' with krb5_get_error_message git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18697 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 42c41f9ac..38118d4cb 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -433,7 +433,7 @@ errout: free_padata_context(kdc_context, &pa_context); if (status) { - char * emsg = 0; + const char * emsg = 0; if (errcode) emsg = krb5_get_error_message (kdc_context, errcode); diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 7b9e1b573..c7221247c 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -505,7 +505,7 @@ tgt_again: enc_tkt_reply.transited.tr_contents.length, enc_tkt_reply.transited.tr_contents.data); else { - char *emsg = krb5_get_error_message(kdc_context, errcode); + const char *emsg = krb5_get_error_message(kdc_context, errcode); krb5_klog_syslog (LOG_ERR, "unexpected error checking transit from '%s' to '%s' via '%.*s': %s", cname ? cname : "", @@ -648,12 +648,12 @@ tgt_again: cleanup: if (status) { - char * emsg = NULL; + const char * emsg = NULL; if (!errcode) rep_etypes2str(rep_etypestr, sizeof(rep_etypestr), &reply); - if(errcode) - emsg = krb5_get_error_message (kdc_context, errcode); - krb5_klog_syslog(LOG_INFO, + if (errcode) + emsg = krb5_get_error_message (kdc_context, errcode); + krb5_klog_syslog(LOG_INFO, "TGS_REQ (%s) %s: %s: authtime %d, " "%s%s %s for %s%s%s", ktypestr, @@ -664,8 +664,8 @@ cleanup: sname ? sname : "", errcode ? ", " : "", errcode ? emsg : ""); - if(errcode) - krb5_free_error_message (kdc_context, emsg); + if (errcode) + krb5_free_error_message (kdc_context, emsg); } if (errcode) {