From e73b515ad5d073ab4da770a1281bd36d0d09a72c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 13 Oct 2006 21:08:07 +0000 Subject: [PATCH] Use 'const' with krb5_get_error_message git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18697 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_as_req.c | 2 +- src/kdc/do_tgs_req.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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) { -- 2.26.2