Add the needed assert changes to make the code clean
for the new check-pointer-deref script.
'src/network/',
'src/nspawn/',
'src/nss-systemd/',
- 'src/resolve/',
'src/shared/',
# libc/ has no assert() or systemd-headers so leave it
'src/libc/',
#if HAVE_OPENSSL
static int rr_compare(DnsResourceRecord * const *a, DnsResourceRecord * const *b) {
- const DnsResourceRecord *x = *a, *y = *b;
+ const DnsResourceRecord *x = *ASSERT_PTR(a), *y = *ASSERT_PTR(b);
size_t m;
int r;
Manager *m,
DnsStubListenerExtra **ret) {
+ assert(ret);
+
DnsStubListenerExtra *l;
l = new(DnsStubListenerExtra, 1);
size_t length;
DnsTxtItem *i;
+ assert(ret_item);
+
length = strlen(key);
if (!isempty(value))
size_t length;
DnsTxtItem *i;
+ assert(ret_item);
+
length = strlen(key);
if (size > 0)
assert(l);
assert(in_addr);
+ assert(in_addr_broadcast);
a = new(LinkAddress, 1);
if (!a)
uint64_t u, a;
char *n;
+ assert(ret_new);
+
p = strchr(old, 0);
assert(p);
#include "tests.h"
static void dns_scope_freep(DnsScope **s) {
+ POINTER_MAY_BE_NULL(s);
+
if (s != NULL && *s != NULL)
dns_scope_free(*s);
}