void heim_error_create_opt(heim_error_t *error, int error_code, const char *fmt, ...) { if (error) { va_list ap; va_start(ap, fmt); *error = heim_error_createv(error_code, fmt, ap); va_end(ap); } }
heim_error_t heim_error_create(int error_code, const char *fmt, ...) { heim_error_t e; va_list ap; va_start(ap, fmt); e = heim_error_createv(error_code, fmt, ap); va_end(ap); return e; }
void hx509_set_error_stringv(hx509_context context, int flags, int code, const char *fmt, va_list ap) { heim_error_t msg; if (context == NULL) return; msg = heim_error_createv(code, fmt, ap); if (msg) { if (flags & HX509_ERROR_APPEND) heim_error_append(msg, context->error); heim_release(context->error); } context->error = msg; }