From 597da51bae9e46a93b310125174d48c9438d3bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 18 Dec 2019 13:54:13 +0100 Subject: tree-wide: make parse_ifindex simply return the index We don't need a seperate output parameter that is of type int. glibc() says that the type is "unsigned", but the kernel thinks it's "int". And the "alternative names" interface also uses ints. So let's standarize on ints, since it's clearly not realisitic to have interface numbers in the upper half of unsigned int range. --- src/basic/parse-util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/basic/parse-util.h') diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h index 3a70b79276..b20f5b52cc 100644 --- a/src/basic/parse-util.h +++ b/src/basic/parse-util.h @@ -13,8 +13,8 @@ int parse_boolean(const char *v) _pure_; int parse_dev(const char *s, dev_t *ret); int parse_pid(const char *s, pid_t* ret_pid); int parse_mode(const char *s, mode_t *ret); -int parse_ifindex(const char *s, int *ret); -int parse_ifindex_or_ifname(const char *s, int *ret); +int parse_ifindex(const char *s); +int parse_ifindex_or_ifname(const char *s); int parse_mtu(int family, const char *s, uint32_t *ret); int parse_size(const char *t, uint64_t base, uint64_t *size); -- cgit v1.2.1