diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/in-addr-util.c | 14 | ||||
-rw-r--r-- | src/shared/in-addr-util.h | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/shared/in-addr-util.c b/src/shared/in-addr-util.c index 0c6ebec336..ffbaa74316 100644 --- a/src/shared/in-addr-util.c +++ b/src/shared/in-addr-util.c @@ -23,7 +23,7 @@ #include "in-addr-util.h" -int in_addr_null(unsigned family, union in_addr_union *u) { +int in_addr_null(int family, union in_addr_union *u) { assert(u); if (family == AF_INET) @@ -40,7 +40,7 @@ int in_addr_null(unsigned family, union in_addr_union *u) { } -int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_union *b) { +int in_addr_equal(int family, union in_addr_union *a, union in_addr_union *b) { assert(a); assert(b); @@ -58,7 +58,7 @@ int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_union * } int in_addr_prefix_intersect( - unsigned family, + int family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, @@ -114,7 +114,7 @@ int in_addr_prefix_intersect( return -EAFNOSUPPORT; } -int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned prefixlen) { +int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen) { assert(u); /* Increases the network part of an address by one. Returns @@ -167,7 +167,7 @@ int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned prefix return -EAFNOSUPPORT; } -int in_addr_to_string(unsigned family, const union in_addr_union *u, char **ret) { +int in_addr_to_string(int family, const union in_addr_union *u, char **ret) { char *x; size_t l; @@ -195,7 +195,7 @@ int in_addr_to_string(unsigned family, const union in_addr_union *u, char **ret) return 0; } -int in_addr_from_string(unsigned family, const char *s, union in_addr_union *ret) { +int in_addr_from_string(int family, const char *s, union in_addr_union *ret) { assert(s); assert(ret); @@ -210,7 +210,7 @@ int in_addr_from_string(unsigned family, const char *s, union in_addr_union *ret return 0; } -int in_addr_from_string_auto(const char *s, unsigned *family, union in_addr_union *ret) { +int in_addr_from_string_auto(const char *s, int *family, union in_addr_union *ret) { int r; assert(s); diff --git a/src/shared/in-addr-util.h b/src/shared/in-addr-util.h index 6cfdb14a89..d76ea9dc30 100644 --- a/src/shared/in-addr-util.h +++ b/src/shared/in-addr-util.h @@ -31,13 +31,13 @@ union in_addr_union { struct in6_addr in6; }; -int in_addr_null(unsigned family, union in_addr_union *u); -int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_union *b); -int in_addr_prefix_intersect(unsigned family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen); -int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned prefixlen); -int in_addr_to_string(unsigned family, const union in_addr_union *u, char **ret); -int in_addr_from_string(unsigned family, const char *s, union in_addr_union *ret); -int in_addr_from_string_auto(const char *s, unsigned *family, union in_addr_union *ret); +int in_addr_null(int family, union in_addr_union *u); +int in_addr_equal(int family, union in_addr_union *a, union in_addr_union *b); +int in_addr_prefix_intersect(int family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen); +int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen); +int in_addr_to_string(int family, const union in_addr_union *u, char **ret); +int in_addr_from_string(int family, const char *s, union in_addr_union *ret); +int in_addr_from_string_auto(const char *s, int *family, union in_addr_union *ret); static inline size_t FAMILY_ADDRESS_SIZE(int family) { assert(family == AF_INET || family == AF_INET6); |