Commit 825e5b2d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Always wrap code-generating macros in do { ... } while(0)

parent eb56e6df
......@@ -51,10 +51,12 @@ h2_panic_settings(struct vsb *vsb, const struct h2_settings *s)
int cont = 0;
#define H2_SETTING(U,l,...) \
if (cont) \
VSB_printf(vsb, ", "); \
cont = 1; \
VSB_printf(vsb, "0x%x", s->l);
do { \
if (cont) \
VSB_printf(vsb, ", "); \
cont = 1; \
VSB_printf(vsb, "0x%x", s->l); \
} while (0);
#include "tbl/h2_settings.h"
#undef H2_SETTING
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment