From a287a30dda5ab7902569b06342c68d5df7082a66 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Mon, 9 Sep 2019 16:56:53 -0400 Subject: misc: fix coverity warning in the oddbuf plugin Clean up license / copyright headers Type: fix Ticket: VPP-1771 Signed-off-by: Dave Barach Change-Id: Ibfc2a46632e17578fd74357b83f417987b8447be --- src/plugins/oddbuf/oddbuf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/plugins/oddbuf/oddbuf.c') 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) + * 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); } -- cgit 1.2.3-korg