X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-trace.c;h=5e349c7e43f188918d731e9ced8f97d2d88b1e01;hb=0d3dc9722c610857c2f83c4f3bf06299f2426a95;hp=802015fa3eee4ed9afbd2b18d3ef15d77bc68180;hpb=a2cf84ecde926adeebf09bc2c284401513d3fab3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-trace.c b/src/afb-trace.c index 802015fa..5e349c7e 100644 --- a/src/afb-trace.c +++ b/src/afb-trace.c @@ -67,7 +67,7 @@ /* struct for tags */ struct tag { struct tag *next; /* link to the next */ - char tag[1]; /* name of the tag */ + char tag[]; /* name of the tag */ }; /* struct for events */ @@ -866,11 +866,6 @@ static void hook_session_destroy(void *closure, const struct afb_hookid *hookid, hook_session(closure, hookid, session, "destroy", NULL); } -static void hook_session_renew(void *closure, const struct afb_hookid *hookid, struct afb_session *session) -{ - hook_session(closure, hookid, session, "renew", "{ss}", "token", afb_session_token(session)); -} - static void hook_session_addref(void *closure, const struct afb_hookid *hookid, struct afb_session *session) { hook_session(closure, hookid, session, "addref", NULL); @@ -885,7 +880,6 @@ static struct afb_hook_session_itf hook_session_itf = { .hook_session_create = hook_session_create, .hook_session_close = hook_session_close, .hook_session_destroy = hook_session_destroy, - .hook_session_renew = hook_session_renew, .hook_session_addref = hook_session_addref, .hook_session_unref = hook_session_unref }; @@ -1073,7 +1067,7 @@ static struct tag *trace_get_tag(struct afb_trace *trace, const char *name, int if (!tag && alloc) { /* creation if needed */ - tag = malloc(sizeof * tag + strlen(name)); + tag = malloc(sizeof * tag + 1 + strlen(name)); if (tag) { strcpy(tag->tag, name); tag->next = trace->tags;