resolved: make use of union in_addr_union in resolved, too

This commit is contained in:
Lennart Poettering 2014-07-07 23:11:48 +02:00
parent 186fe1db20
commit c92e531c82
3 changed files with 6 additions and 4 deletions

View file

@ -114,6 +114,8 @@ int manager_new(Manager **ret) {
_cleanup_manager_free_ Manager *m = NULL;
int r;
assert(ret);
m = new0(Manager, 1);
if (!m)
return -ENOMEM;

View file

@ -26,6 +26,7 @@
#include "util.h"
#include "list.h"
#include "socket-util.h"
typedef struct Address Address;
typedef struct Manager Manager;
@ -33,10 +34,7 @@ typedef struct Manager Manager;
struct Address {
unsigned char family;
union {
struct in_addr in;
struct in6_addr in6;
} in_addr;
union in_addr_union in_addr;
LIST_FIELDS(Address, addresses);
};

View file

@ -1019,6 +1019,8 @@ static int manager_new(Manager **ret) {
_cleanup_manager_free_ Manager *m = NULL;
int r;
assert(ret);
m = new0(Manager, 1);
if (!m)
return -ENOMEM;