From: Stephen Hemminger Date: Tue, 8 Dec 2015 16:51:09 +0000 (-0800) Subject: examples/ethtool: remove dead code X-Git-Tag: spdx-start~7806 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=94cb97a03999dda5ccbc89b8f96c51bcfc677c5c;p=dpdk.git examples/ethtool: remove dead code Remove dead code, and print better return for other errors. >>> CID 120411: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Signed-off-by: Stephen Hemminger Acked-by: Remy Horton --- diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c index 57c584e90e..3863b02561 100644 --- a/examples/ethtool/ethtool-app/ethapp.c +++ b/examples/ethtool/ethtool-app/ethapp.c @@ -480,12 +480,9 @@ pcmd_macaddr_callback(void *ptr_params, return; } } - if (stat == 0) - return; - else if (stat == -ENOTSUP) - printf("Port %i: Operation not supported\n", params->port); - else - printf("Port %i: Error %i\n", params->port, stat); + + printf("Port %i: Error %s\n", params->port, + strerror(-stat)); } static void