.func = __func__, \
.line = _line, \
.type = _type, \
- .desc = (sizeof("" __VA_ARGS__) > 1) ? \
- "\"" #_cond "\" [" __VA_ARGS__ "]" : \
- "\"" #_cond "\"", \
+ .desc = (sizeof("" #_cond) > 1) ? \
+ (sizeof("" __VA_ARGS__) > 1) ? \
+ "\"" #_cond "\" [" __VA_ARGS__ "]" : \
+ "\"" #_cond "\"" : \
+ "" __VA_ARGS__, \
.count = 0, \
}; \
HA_WEAK(__start_dbg_cnt); \
}
if (ptr->type < DBG_COUNTER_TYPES)
- chunk_appendf(&trash, "%-10u %3s %s:%d %s(): %s\n",
+ chunk_appendf(&trash, "%-10u %3s %s:%d %s()%s%s\n",
ptr->count, bug_type[ptr->type],
- name, ptr->line, ptr->func, ptr->desc);
+ name, ptr->line, ptr->func,
+ *ptr->desc ? ": " : "", ptr->desc);
if (applet_putchk(appctx, &trash) == -1) {
ctx->start = ptr;