Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-ditf: use NULL function feature
[src/app-framework-binder.git]
/
src
/
afb-ditf.c
diff --git
a/src/afb-ditf.c
b/src/afb-ditf.c
index
28cd46a
..
63268a8
100644
(file)
--- 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;
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);
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)
{
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)
}
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)
{
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)
}
static struct afb_event hooked_event_make_cb(void *closure, const char *name)