less const warnings for com_right_r
This commit is contained in:
@@ -234,10 +234,11 @@ krb5_get_error_message(krb5_context context, krb5_error_code code)
|
|||||||
if (code == 0)
|
if (code == 0)
|
||||||
return strdup("Success");
|
return strdup("Success");
|
||||||
{
|
{
|
||||||
|
const char *msg;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
str = com_right_r(context->et_list, code, buf, sizeof(buf));
|
msg = com_right_r(context->et_list, code, buf, sizeof(buf));
|
||||||
if (str)
|
if (msg)
|
||||||
return strdup(str);
|
return strdup(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asprintf(&str, "<unknown error: %d>", (int)code) == -1)
|
if (asprintf(&str, "<unknown error: %d>", (int)code) == -1)
|
||||||
|
Reference in New Issue
Block a user