From faeacc69b5c9e386ea2977506b24dea055bf926b Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 8 May 2012 03:04:12 +0000 Subject: [PATCH] Improve display of error code 0 in trace output git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25853 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/trace.c b/src/lib/krb5/os/trace.c index 309ffa154..a231ca04d 100644 --- a/src/lib/krb5/os/trace.c +++ b/src/lib/krb5/os/trace.c @@ -178,7 +178,8 @@ trace_format(krb5_context context, const char *fmt, va_list ap) } else if (strcmp(tmpbuf, "kerr") == 0) { kerr = va_arg(ap, krb5_error_code); p = krb5_get_error_message(context, kerr); - krb5int_buf_add_fmt(&buf, "%ld/%s", (long) kerr, p); + krb5int_buf_add_fmt(&buf, "%ld/%s", (long) kerr, + kerr ? p : "Success"); krb5_free_error_message(context, p); } else if (strcmp(tmpbuf, "keyblock") == 0) { keyblock = va_arg(ap, const krb5_keyblock *); -- 2.26.2