From 8d16484f1796d79637345895c313976721fe87e9 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Tue, 3 Nov 2009 23:59:38 -0800 Subject: [PATCH] less const warnings for com_right_r --- lib/krb5/error_string.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/krb5/error_string.c b/lib/krb5/error_string.c index 52284e4d1..673021f89 100644 --- a/lib/krb5/error_string.c +++ b/lib/krb5/error_string.c @@ -234,10 +234,11 @@ krb5_get_error_message(krb5_context context, krb5_error_code code) if (code == 0) return strdup("Success"); { + const char *msg; char buf[128]; - str = com_right_r(context->et_list, code, buf, sizeof(buf)); - if (str) - return strdup(str); + msg = com_right_r(context->et_list, code, buf, sizeof(buf)); + if (msg) + return strdup(msg); } if (asprintf(&str, "", (int)code) == -1)