From e3bd65b7eaa5b47b4029f92e909a6aae4fbdb152 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 1 Jul 2015 10:28:43 +0200 Subject: netsniff-ng: dev: Rename device_ifindex_get to __device_ifindex Make the function name more in line with the scheme we use for other similar functions: the function prefixed with __ returns a negative error code, the function without prefix panic()'s on error. Signed-off-by: Tobias Klauser --- dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev.c') diff --git a/dev.c b/dev.c index c28fa0e..20dfe17 100644 --- a/dev.c +++ b/dev.c @@ -14,7 +14,7 @@ #include "link.h" #include "built_in.h" -int device_ifindex_get(const char *ifname) +int __device_ifindex(const char *ifname) { int ret, sock, index; struct ifreq ifr; @@ -40,7 +40,7 @@ int device_ifindex_get(const char *ifname) int device_ifindex(const char *ifname) { - int index = device_ifindex_get(ifname); + int index = __device_ifindex(ifname); if (unlikely(index < 0)) panic("Cannot get ifindex from device!\n"); -- cgit v1.2.3-54-g00ecf