summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-manager.c2
-rw-r--r--src/resolve/resolved.h6
-rw-r--r--src/timesync/timesyncd.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 0e2b85b5a9..9d073c725c 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -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;
diff --git a/src/resolve/resolved.h b/src/resolve/resolved.h
index 984edc76c1..48b361db57 100644
--- a/src/resolve/resolved.h
+++ b/src/resolve/resolved.h
@@ -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);
};
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 27f6b2d226..0c50902d1d 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -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;