diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-18 16:09:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-18 16:10:51 +0200 |
commit | 0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a (patch) | |
tree | 2f253672d8a0a97c8c19ba1ce2cad26a5bef62a8 /src/resolve/resolved-manager.c | |
parent | f41925b4e442a34c93ad120ef1426c974a047ed1 (diff) |
change type for address family to "int"
Let's settle on a single type for all address family values, even if
UNIX is very inconsitent on the precise type otherwise. Given that
socket() is the primary entrypoint for the sockets API, and that uses
"int", and "int" is relatively simple and generic, we settle on "int"
for this.
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r-- | src/resolve/resolved-manager.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index 9f44bf1204..96728433b3 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -94,9 +94,8 @@ fail: static int manager_process_address(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) { Manager *m = userdata; union in_addr_union address; - unsigned char family; uint16_t type; - int r, ifindex; + int r, ifindex, family; LinkAddress *a; Link *l; @@ -311,7 +310,7 @@ static int parse_dns_server_string(Manager *m, const char *string) { FOREACH_WORD_QUOTED(word, length, string, state) { char buffer[length+1]; - unsigned family; + int family; union in_addr_union addr; memcpy(buffer, word, length); @@ -860,7 +859,7 @@ static int manager_ipv6_send(Manager *m, int fd, int ifindex, struct in6_addr *a return sendmsg_loop(fd, &mh, 0); } -int manager_send(Manager *m, int fd, int ifindex, unsigned char family, union in_addr_union *addr, uint16_t port, DnsPacket *p) { +int manager_send(Manager *m, int fd, int ifindex, int family, union in_addr_union *addr, uint16_t port, DnsPacket *p) { assert(m); assert(fd >= 0); assert(addr); @@ -876,7 +875,7 @@ int manager_send(Manager *m, int fd, int ifindex, unsigned char family, union in } -DnsServer* manager_find_dns_server(Manager *m, unsigned char family, union in_addr_union *in_addr) { +DnsServer* manager_find_dns_server(Manager *m, int family, union in_addr_union *in_addr) { DnsServer *s; assert(m); |