diff options
author | Dave Barach <dave@barachs.net> | 2019-09-09 16:56:53 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2019-09-09 16:58:40 -0400 |
commit | a287a30dda5ab7902569b06342c68d5df7082a66 (patch) | |
tree | 9ce03a120d3b264b1be7daf8283da738e0f9683d /src/plugins/oddbuf/oddbuf.c | |
parent | 5b786fb89483a77614dd40e8959463816d79fcbb (diff) |
misc: fix coverity warning in the oddbuf plugin
Clean up license / copyright headers
Type: fix
Ticket: VPP-1771
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ibfc2a46632e17578fd74357b83f417987b8447be
Diffstat (limited to 'src/plugins/oddbuf/oddbuf.c')
-rw-r--r-- | src/plugins/oddbuf/oddbuf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/oddbuf/oddbuf.c b/src/plugins/oddbuf/oddbuf.c index db2e682a676..9b95fcc8a85 100644 --- a/src/plugins/oddbuf/oddbuf.c +++ b/src/plugins/oddbuf/oddbuf.c @@ -1,7 +1,7 @@ /* - * oddbuf.c - skeleton vpp engine plug-in + * oddbuf.c - awkward chained buffer geometry test tool * - * Copyright (c) <current-year> <your-organization> + * Copyright (c) 2019 by Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -147,11 +147,15 @@ static void vl_api_oddbuf_enable_disable_t_handler { vl_api_oddbuf_enable_disable_reply_t *rmp; oddbuf_main_t *omp = &oddbuf_main; + u32 sw_if_index; int rv; - rv = oddbuf_enable_disable (omp, ntohl (mp->sw_if_index), - (int) (mp->enable_disable)); + VALIDATE_SW_IF_INDEX (mp); + sw_if_index = clib_net_to_host_u32 (mp->sw_if_index); + rv = oddbuf_enable_disable (omp, sw_if_index, (int) (mp->enable_disable)); + + BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_ODDBUF_ENABLE_DISABLE_REPLY); } |