X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ditf.c;h=63268a85e5408fc4ab2b8a24e084804b34e2fb28;hb=e51d68ddc998f558507217e3c849b16ce94c068f;hp=28cd46a73ffb5f4d453d688e35a1e63a79ed0e4e;hpb=36c7ab15e79d6b0ff6188b61da1061f36b902f8e;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ditf.c b/src/afb-ditf.c index 28cd46a7..63268a85 100644 --- a/src/afb-ditf.c +++ b/src/afb-ditf.c @@ -46,7 +46,7 @@ static void vverbose_cb(void *closure, int level, const char *file, int line, co char *p; struct afb_ditf *ditf = closure; - if (vasprintf(&p, fmt, args) < 0) + if (!fmt || vasprintf(&p, fmt, args) < 0) vverbose(level, file, line, function, fmt, args); else { verbose(level, file, line, function, "[API %s] %s", ditf->api, p); @@ -56,7 +56,7 @@ static void vverbose_cb(void *closure, int level, const char *file, int line, co static void old_vverbose_cb(void *closure, int level, const char *file, int line, const char *fmt, va_list args) { - vverbose_cb(closure, level, file, line, "?", fmt, args); + vverbose_cb(closure, level, file, line, NULL, fmt, args); } static struct afb_event event_make_cb(void *closure, const char *name) @@ -152,7 +152,7 @@ static void hooked_vverbose_cb(void *closure, int level, const char *file, int l static void hooked_old_vverbose_cb(void *closure, int level, const char *file, int line, const char *fmt, va_list args) { - hooked_vverbose_cb(closure, level, file, line, "?", fmt, args); + hooked_vverbose_cb(closure, level, file, line, NULL, fmt, args); } static struct afb_event hooked_event_make_cb(void *closure, const char *name)