diff --git a/lib/base/heimbase-svc.h b/lib/base/heimbase-svc.h index 6e7eb5fb9..1f0abd622 100644 --- a/lib/base/heimbase-svc.h +++ b/lib/base/heimbase-svc.h @@ -68,6 +68,7 @@ const char *e_text; \ char *e_text_buf; \ heim_string_t reason; \ - heim_array_t kv + heim_array_t kv; \ + int32_t ret #endif /* HEIMBASE_SVC_H */ diff --git a/lib/base/log.c b/lib/base/log.c index 98c4dcddc..904d0c3ba 100644 --- a/lib/base/log.c +++ b/lib/base/log.c @@ -820,7 +820,7 @@ heim_audit_trail(heim_svc_req_desc r, heim_error_code ret, const char *retname) #define CASE(x) case x : retval = #x; break if (retname) { retval = retname; - } else switch (ret) { + } else switch (ret ? ret : r->ret) { CASE(ENOMEM); CASE(ENOENT); CASE(EACCES);