summaryrefslogtreecommitdiff
path: root/examples/ethtool
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2015-12-08 08:51:09 -0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-09 22:02:33 +0100
commit94cb97a03999dda5ccbc89b8f96c51bcfc677c5c (patch)
treefae5ed51e7f64fc202ba302c2d672a9fc3f418a3 /examples/ethtool
parent98b5ecbf76f0743128b4e0dd69a5481ace5005f6 (diff)
downloaddpdk-94cb97a03999dda5ccbc89b8f96c51bcfc677c5c.zip
dpdk-94cb97a03999dda5ccbc89b8f96c51bcfc677c5c.tar.gz
dpdk-94cb97a03999dda5ccbc89b8f96c51bcfc677c5c.tar.xz
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 <stephen@networkplumber.org> Acked-by: Remy Horton <remy.horton@intel.com>
Diffstat (limited to 'examples/ethtool')
-rw-r--r--examples/ethtool/ethtool-app/ethapp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 57c584e..3863b02 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