diff options
author | Jon Loeliger <jdl@netgate.com> | 2017-02-01 13:09:58 -0600 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-02-02 17:32:49 +0000 |
commit | 2d23eca3e583cc3408d4fafc3aae6fe5b1109e55 (patch) | |
tree | bdf23b490b3939b3b5fe3020acb32e733a9d24f3 /src/plugins/snat/snat_test.c | |
parent | 56c7b01e163c233030359781d7e60f4553e90c51 (diff) |
Remove unnecessary block structure around CONTROL_PING messages.
Now that the M() and S() macros accept a message parameter, there
is no longer a need to introduce a new block structure around the
CONTROL_PING messages just to have a new unbound "mp" variable.
Instead, just use one named "mp_ping" directly.
Change-Id: I6b283562bb6eec25806e3d35c35b977680ecd1dd
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/plugins/snat/snat_test.c')
-rw-r--r-- | src/plugins/snat/snat_test.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/plugins/snat/snat_test.c b/src/plugins/snat/snat_test.c index 086059a3942..50e81eaec46 100644 --- a/src/plugins/snat/snat_test.c +++ b/src/plugins/snat/snat_test.c @@ -317,6 +317,7 @@ static void vl_api_snat_static_mapping_details_t_handler static int api_snat_static_mapping_dump(vat_main_t * vam) { vl_api_snat_static_mapping_dump_t * mp; + vl_api_snat_control_ping_t *mp_ping; int ret; if (vam->json_output) @@ -331,12 +332,11 @@ static int api_snat_static_mapping_dump(vat_main_t * vam) M(SNAT_STATIC_MAPPING_DUMP, mp); S(mp); + /* Use a control ping for synchronization */ - { - vl_api_snat_control_ping_t *mp; - M(SNAT_CONTROL_PING, mp); - S(mp); - } + M(SNAT_CONTROL_PING, mp_ping); + S(mp_ping); + W (ret); return ret; } @@ -401,6 +401,7 @@ static void vl_api_snat_address_details_t_handler static int api_snat_address_dump(vat_main_t * vam) { vl_api_snat_address_dump_t * mp; + vl_api_snat_control_ping_t *mp_ping; int ret; if (vam->json_output) @@ -411,12 +412,11 @@ static int api_snat_address_dump(vat_main_t * vam) M(SNAT_ADDRESS_DUMP, mp); S(mp); + /* Use a control ping for synchronization */ - { - vl_api_snat_control_ping_t *mp; - M(SNAT_CONTROL_PING, mp); - S(mp); - } + M(SNAT_CONTROL_PING, mp_ping); + S(mp_ping); + W (ret); return ret; } @@ -434,6 +434,7 @@ static void vl_api_snat_interface_details_t_handler static int api_snat_interface_dump(vat_main_t * vam) { vl_api_snat_interface_dump_t * mp; + vl_api_snat_control_ping_t *mp_ping; int ret; if (vam->json_output) @@ -444,12 +445,11 @@ static int api_snat_interface_dump(vat_main_t * vam) M(SNAT_INTERFACE_DUMP, mp); S(mp); + /* Use a control ping for synchronization */ - { - vl_api_snat_control_ping_t *mp; - M(SNAT_CONTROL_PING, mp); - S(mp); - } + M(SNAT_CONTROL_PING, mp_ping); + S(mp_ping); + W (ret); return ret; } @@ -493,6 +493,7 @@ static void vl_api_snat_worker_details_t_handler static int api_snat_worker_dump(vat_main_t * vam) { vl_api_snat_worker_dump_t * mp; + vl_api_snat_control_ping_t *mp_ping; int ret; if (vam->json_output) @@ -503,12 +504,11 @@ static int api_snat_worker_dump(vat_main_t * vam) M(SNAT_WORKER_DUMP, mp); S(mp); + /* Use a control ping for synchronization */ - { - vl_api_snat_control_ping_t *mp; - M(SNAT_CONTROL_PING, mp); - S(mp); - } + M(SNAT_CONTROL_PING, mp_ping); + S(mp_ping); + W (ret); return ret; } @@ -564,6 +564,7 @@ static void vl_api_snat_interface_addr_details_t_handler static int api_snat_interface_addr_dump(vat_main_t * vam) { vl_api_snat_interface_addr_dump_t * mp; + vl_api_snat_control_ping_t *mp_ping; int ret; if (vam->json_output) @@ -574,12 +575,11 @@ static int api_snat_interface_addr_dump(vat_main_t * vam) M(SNAT_INTERFACE_ADDR_DUMP, mp); S(mp); + /* Use a control ping for synchronization */ - { - vl_api_snat_control_ping_t *mp; - M(SNAT_CONTROL_PING, mp); - S(mp); - } + M(SNAT_CONTROL_PING, mp_ping); + S(mp_ping); + W (ret); return ret; } |