diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2021-02-15 17:20:55 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2021-02-15 17:24:42 +0100 |
commit | db403a4e3ef1cb809079faf3d9aa8c805c5ce874 (patch) | |
tree | 47565053d3718dd6323c8aa9dde566fba9f46b7b | |
parent | b89632cc672d50b5bbd5fad55536e010ca27c804 (diff) |
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
-rw-r--r-- | src/common/vty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/vty.c b/src/common/vty.c index f2c79547..d60a2be9 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -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, |