vty: dont put a colon after vty_out in cfg_out macro

The cfg_out macro is used like a function in the code below its
definition. This means a colon will follow after it is used. When
the vty_out call in the macro already has a colon the final result will
be vty_out(...);;. This works fine as long the macro is not used in one
line if/else if/else constructs without curly braces {}. The compiler
will interpret the double colon as two lines of code and run into an
error then. Lets fix this by removing the colon from the vty_cout in the
macro.

Change-Id: I2c23c38ce892067add0f95f3e504a9c559e24519
This commit is contained in:
Philipp Maier 2021-02-15 17:20:55 +01:00
parent b89632cc67
commit db403a4e3e
1 changed files with 1 additions and 1 deletions

View File

@ -1240,7 +1240,7 @@ DEFUN_HIDDEN(radio_link_timeout, radio_link_timeout_cmd, "bts <0-0> radio-link-t
/* TODO: generalize and move indention handling to libosmocore */
#define cfg_out(vty, fmt, args...) \
vty_out(vty, "%*s" fmt, indent, "", ##args);
vty_out(vty, "%*s" fmt, indent, "", ##args)
static void dump_dpc_meas_params(struct vty *vty, const unsigned int indent,
const struct gsm_power_ctrl_meas_params *mp,