Skip to content

Commit

Permalink
no VUT_Usage in plus
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Jun 25, 2024
1 parent e42c540 commit 84c9a6c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ static int process_group(struct VSL_data *vsl,
switch (tag) {
case SLT_Begin:
VSB_clear(vsb);
VSB_printf(vsb, "%ld", t->vxid);
#ifdef VARNISH_PLUS
VSB_printf(vsb, "%u", t->vxid);
#else
VSB_printf(vsb, "%lu", t->vxid);
#endif
VSB_finish(vsb);
cJSON_AddStringToObject(transaction, "id", VSB_data(vsb));
break;
Expand Down Expand Up @@ -495,6 +499,21 @@ static int process_group(struct VSL_data *vsl,
return (0);
}

#ifdef VARNISH_PLUS
static void v_noreturn_
usage(int status)
{
const char **opt;
fprintf(stderr, "Usage: %s <options>\n\n", vut->progname);
fprintf(stderr, "Options:\n");
for (opt = vopt_spec.vopt_usage; *opt != NULL; opt += 2)
fprintf(stderr, " %-25s %s\n", *opt, *(opt + 1));
exit(status);
}

#define VUT_Usage(a, b, ret) usage(ret)
#endif

int main(int argc, char **argv)
{
int opt;
Expand Down

0 comments on commit 84c9a6c

Please sign in to comment.