* limitations under the License.
*/
+#if WITH_AFB_HOOK && WITH_AFB_TRACE
+
#define _GNU_SOURCE
#include <assert.h>
/* 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 */
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;
free(context.errors);
return -1;
}
+
+#endif