]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util-lib: split out allocation calls into alloc-util.[ch]
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2015 02:01:06 +0000 (03:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2015 12:45:53 +0000 (13:45 +0100)
399 files changed:
Makefile.am
src/activate/activate.c
src/analyze/analyze-verify.c
src/analyze/analyze.c
src/backlight/backlight.c
src/basic/alloc-util.c [new file with mode: 0644]
src/basic/alloc-util.h [new file with mode: 0644]
src/basic/audit-util.c
src/basic/bitmap.c
src/basic/btrfs-util.c
src/basic/bus-label.c
src/basic/calendarspec.c
src/basic/capability-util.c
src/basic/cgroup-util.c
src/basic/copy.c
src/basic/cpu-set-util.c
src/basic/env-util.c
src/basic/escape.c
src/basic/extract-word.c
src/basic/fileio.c
src/basic/fs-util.c
src/basic/hashmap.c
src/basic/hexdecoct.c
src/basic/in-addr-util.c
src/basic/json.c
src/basic/lockfile-util.c
src/basic/log.c
src/basic/memfd-util.c
src/basic/mount-util.c
src/basic/path-util.c
src/basic/prioq.c
src/basic/proc-cmdline.c
src/basic/process-util.c
src/basic/replace-var.c
src/basic/selinux-util.c
src/basic/smack-util.c
src/basic/socket-label.c
src/basic/socket-util.c
src/basic/strbuf.c
src/basic/string-util.c
src/basic/strv.c
src/basic/terminal-util.c
src/basic/time-util.c
src/basic/unit-name.c
src/basic/user-util.c
src/basic/utf8.c
src/basic/util.c
src/basic/util.h
src/basic/virt.c
src/basic/xattr-util.c
src/binfmt/binfmt.c
src/boot/bootctl.c
src/bootchart/bootchart.c
src/bootchart/store.c
src/bootchart/svg.c
src/bus-proxyd/bus-proxyd.c
src/bus-proxyd/bus-xml-policy.c
src/bus-proxyd/driver.c
src/bus-proxyd/proxy.c
src/bus-proxyd/stdio-bridge.c
src/bus-proxyd/test-bus-xml-policy.c
src/cgls/cgls.c
src/cgtop/cgtop.c
src/core/automount.c
src/core/bus-endpoint.c
src/core/bus-policy.c
src/core/busname.c
src/core/cgroup.c
src/core/dbus-cgroup.c
src/core/dbus-execute.c
src/core/dbus-job.c
src/core/dbus-manager.c
src/core/dbus-scope.c
src/core/dbus-service.c
src/core/dbus-socket.c
src/core/dbus-timer.c
src/core/dbus-unit.c
src/core/dbus.c
src/core/device.c
src/core/execute.c
src/core/hostname-setup.c
src/core/job.c
src/core/killall.c
src/core/load-fragment.c
src/core/machine-id-setup.c
src/core/main.c
src/core/manager.c
src/core/mount-setup.c
src/core/mount.c
src/core/namespace.c
src/core/scope.c
src/core/selinux-access.c
src/core/service.c
src/core/show-status.c
src/core/shutdown.c
src/core/slice.c
src/core/smack-setup.c
src/core/snapshot.c
src/core/socket.c
src/core/swap.c
src/core/timer.c
src/core/transaction.c
src/core/umount.c
src/core/unit-printf.c
src/core/unit.c
src/cryptsetup/cryptsetup-generator.c
src/cryptsetup/cryptsetup.c
src/dbus1-generator/dbus1-generator.c
src/debug-generator/debug-generator.c
src/delta/delta.c
src/escape/escape.c
src/firstboot/firstboot.c
src/fsck/fsck.c
src/fstab-generator/fstab-generator.c
src/getty-generator/getty-generator.c
src/gpt-auto-generator/gpt-auto-generator.c
src/hibernate-resume/hibernate-resume-generator.c
src/hibernate-resume/hibernate-resume.c
src/hostname/hostnamectl.c
src/hostname/hostnamed.c
src/hwdb/hwdb.c
src/import/curl-util.c
src/import/export-raw.c
src/import/export-tar.c
src/import/export.c
src/import/import-raw.c
src/import/import-tar.c
src/import/import.c
src/import/importd.c
src/import/pull-common.c
src/import/pull-dkr.c
src/import/pull-job.c
src/import/pull-raw.c
src/import/pull-tar.c
src/import/pull.c
src/import/qcow2-util.c
src/initctl/initctl.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote-parse.c
src/journal-remote/journal-remote-write.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload-journal.c
src/journal-remote/journal-upload.c
src/journal-remote/microhttpd-util.c
src/journal/catalog.c
src/journal/compress.c
src/journal/coredump-vacuum.c
src/journal/coredump.c
src/journal/coredumpctl.c
src/journal/journal-file.c
src/journal/journal-send.c
src/journal/journal-vacuum.c
src/journal/journal-verify.c
src/journal/journalctl.c
src/journal/journald-audit.c
src/journal/journald-console.c
src/journal/journald-native.c
src/journal/journald-rate-limit.c
src/journal/journald-server.c
src/journal/journald-stream.c
src/journal/journald-syslog.c
src/journal/journald-wall.c
src/journal/mmap-cache.c
src/journal/sd-journal.c
src/journal/stacktrace.c
src/journal/test-catalog.c
src/journal/test-compress-benchmark.c
src/journal/test-compress.c
src/journal/test-journal-flush.c
src/journal/test-journal-interleaving.c
src/journal/test-journal-match.c
src/journal/test-journal-stream.c
src/journal/test-journal-syslog.c
src/libsystemd-network/dhcp6-option.c
src/libsystemd-network/lldp-internal.c
src/libsystemd-network/lldp-port.c
src/libsystemd-network/lldp-tlv.c
src/libsystemd-network/network-internal.c
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-dhcp6-client.c
src/libsystemd-network/sd-dhcp6-lease.c
src/libsystemd-network/sd-ipv4acd.c
src/libsystemd-network/sd-ipv4ll.c
src/libsystemd-network/sd-lldp.c
src/libsystemd-network/sd-ndisc.c
src/libsystemd-network/sd-pppoe.c
src/libsystemd-network/test-dhcp-client.c
src/libsystemd-network/test-dhcp-option.c
src/libsystemd-network/test-ipv4ll-manual.c
src/libsystemd-network/test-lldp.c
src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-creds.c
src/libsystemd/sd-bus/bus-dump.c
src/libsystemd/sd-bus/bus-error.c
src/libsystemd/sd-bus/bus-internal.c
src/libsystemd/sd-bus/bus-kernel.c
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/bus-message.c
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/bus-slot.c
src/libsystemd/sd-bus/bus-socket.c
src/libsystemd/sd-bus/bus-track.c
src/libsystemd/sd-bus/busctl-introspect.c
src/libsystemd/sd-bus/busctl.c
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/test-bus-benchmark.c
src/libsystemd/sd-bus/test-bus-chat.c
src/libsystemd/sd-bus/test-bus-gvariant.c
src/libsystemd/sd-bus/test-bus-kernel-bloom.c
src/libsystemd/sd-bus/test-bus-kernel.c
src/libsystemd/sd-bus/test-bus-marshal.c
src/libsystemd/sd-bus/test-bus-objects.c
src/libsystemd/sd-bus/test-bus-proxy.c
src/libsystemd/sd-bus/test-bus-zero-copy.c
src/libsystemd/sd-daemon/sd-daemon.c
src/libsystemd/sd-device/device-enumerator.c
src/libsystemd/sd-device/device-private.c
src/libsystemd/sd-device/sd-device.c
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-hwdb/sd-hwdb.c
src/libsystemd/sd-login/sd-login.c
src/libsystemd/sd-login/test-login.c
src/libsystemd/sd-netlink/local-addresses.c
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/netlink-socket.c
src/libsystemd/sd-netlink/sd-netlink.c
src/libsystemd/sd-netlink/test-local-addresses.c
src/libsystemd/sd-network/network-util.c
src/libsystemd/sd-network/sd-network.c
src/libsystemd/sd-path/sd-path.c
src/libsystemd/sd-resolve/sd-resolve.c
src/libsystemd/sd-resolve/test-resolve.c
src/libudev/libudev-device.c
src/libudev/libudev-enumerate.c
src/libudev/libudev-hwdb.c
src/libudev/libudev-list.c
src/libudev/libudev-monitor.c
src/libudev/libudev-queue.c
src/libudev/libudev.c
src/locale/localed.c
src/login/inhibit.c
src/login/loginctl.c
src/login/logind-acl.c
src/login/logind-action.c
src/login/logind-button.c
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-device.c
src/login/logind-inhibit.c
src/login/logind-seat-dbus.c
src/login/logind-seat.c
src/login/logind-session-dbus.c
src/login/logind-session-device.c
src/login/logind-session.c
src/login/logind-user-dbus.c
src/login/logind-user.c
src/login/logind-utmp.c
src/login/logind.c
src/login/pam_systemd.c
src/login/sysfs-show.c
src/machine/image-dbus.c
src/machine/machine-dbus.c
src/machine/machine.c
src/machine/machinectl.c
src/machine/machined-dbus.c
src/machine/machined.c
src/network/networkctl.c
src/network/networkd-address-pool.c
src/network/networkd-address.c
src/network/networkd-dhcp4.c
src/network/networkd-fdb.c
src/network/networkd-link-bus.c
src/network/networkd-link.c
src/network/networkd-manager-bus.c
src/network/networkd-manager.c
src/network/networkd-netdev-bond.c
src/network/networkd-netdev-tuntap.c
src/network/networkd-netdev.c
src/network/networkd-network-bus.c
src/network/networkd-network.c
src/network/networkd-route.c
src/network/networkd-wait-online-link.c
src/network/networkd-wait-online-manager.c
src/network/test-network.c
src/notify/notify.c
src/nspawn/nspawn-cgroup.c
src/nspawn/nspawn-expose-ports.c
src/nspawn/nspawn-mount.c
src/nspawn/nspawn-network.c
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-setuid.c
src/nspawn/nspawn.c
src/nss-myhostname/nss-myhostname.c
src/nss-mymachines/nss-mymachines.c
src/path/path.c
src/random-seed/random-seed.c
src/rc-local-generator/rc-local-generator.c
src/resolve-host/resolve-host.c
src/resolve/resolved-bus.c
src/resolve/resolved-conf.c
src/resolve/resolved-dns-answer.c
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-question.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-stream.c
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-dns-zone.c
src/resolve/resolved-link.c
src/resolve/resolved-manager.c
src/rfkill/rfkill.c
src/run/run.c
src/shared/acl-util.c
src/shared/acpi-fpdt.c
src/shared/apparmor-util.c
src/shared/ask-password-api.c
src/shared/base-filesystem.c
src/shared/bus-util.c
src/shared/cgroup-show.c
src/shared/condition.c
src/shared/conf-parser.c
src/shared/dev-setup.c
src/shared/dns-domain.c
src/shared/dropin.c
src/shared/efivars.c
src/shared/firewall-util.c
src/shared/fstab-util.c
src/shared/generator.c
src/shared/import-util.c
src/shared/install-printf.c
src/shared/install.c
src/shared/logs-show.c
src/shared/machine-image.c
src/shared/machine-pool.c
src/shared/path-lookup.c
src/shared/ptyfwd.c
src/shared/sleep-config.c
src/shared/specifier.c
src/shared/utmp-wtmp.c
src/socket-proxy/socket-proxyd.c
src/systemctl/systemctl.c
src/sysusers/sysusers.c
src/sysv-generator/sysv-generator.c
src/test/test-calendarspec.c
src/test/test-cap-list.c
src/test/test-cgroup-util.c
src/test/test-condition.c
src/test/test-conf-files.c
src/test/test-copy.c
src/test/test-date.c
src/test/test-device-nodes.c
src/test/test-dns-domain.c
src/test/test-ellipsize.c
src/test/test-fileio.c
src/test/test-fstab-util.c
src/test/test-hashmap-plain.c
src/test/test-hostname-util.c
src/test/test-id128.c
src/test/test-json.c
src/test/test-namespace.c
src/test/test-path-util.c
src/test/test-path.c
src/test/test-prioq.c
src/test/test-process-util.c
src/test/test-socket-util.c
src/test/test-strv.c
src/test/test-tmpfiles.c
src/test/test-uid-range.c
src/test/test-unit-file.c
src/test/test-unit-name.c
src/test/test-user-util.c
src/test/test-utf8.c
src/test/test-util.c
src/test/test-xml.c
src/timedate/timedated.c
src/timesync/timesyncd-conf.c
src/timesync/timesyncd-manager.c
src/timesync/timesyncd-server.c
src/tmpfiles/tmpfiles.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/collect/collect.c
src/udev/net/link-config.c
src/udev/udev-builtin-blkid.c
src/udev/udev-builtin-hwdb.c
src/udev/udev-builtin-net_setup_link.c
src/udev/udev-builtin-path_id.c
src/udev/udev-builtin-usb_id.c
src/udev/udev-ctrl.c
src/udev/udev-event.c
src/udev/udev-rules.c
src/udev/udevadm-hwdb.c
src/udev/udevd.c
src/update-utmp/update-utmp.c
src/vconsole/vconsole-setup.c

index 3c4250a144cbcb7adea2032604bbe51199b4732d..9250f8f2c54c5b1ddd52f1cf8aeb6ff14d9a5e18 100644 (file)
@@ -943,6 +943,8 @@ libbasic_la_SOURCES = \
        src/basic/rm-rf.h \
        src/basic/copy.c \
        src/basic/copy.h \
+       src/basic/alloc-util.h \
+       src/basic/alloc-util.c \
        src/basic/formats-util.h
 
 nodist_libbasic_la_SOURCES = \
index 0e6ead310efc03de31f3ecda3f87101dd2aea64c..b7e6255f4905f6c0190a60cf753680712e4d2b1b 100644 (file)
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
+#include "fd-util.h"
 #include "log.h"
 #include "macro.h"
 #include "signal-util.h"
 #include "socket-util.h"
 #include "string-util.h"
 #include "strv.h"
-#include "fd-util.h"
 
 static char** arg_listen = NULL;
 static bool arg_accept = false;
index 2b6240232c60d08d29976d68e67ec03d4c15d554..a377996a37ae158a7bcb3717225ad4428938311f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "analyze-verify.h"
 #include "bus-util.h"
 #include "log.h"
index 7e63bfa8211254df3867a32157dab897b03bf836..27ead903e93d0648cf19b96056e25c71eeceecf0 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "analyze-verify.h"
 #include "bus-error.h"
 #include "bus-util.h"
index 9112ed328d9f8fd2d486d53e905efe5718391105..08980fba823859d587c9f841d4b0d11096373cd6 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "def.h"
 #include "escape.h"
 #include "fileio.h"
diff --git a/src/basic/alloc-util.c b/src/basic/alloc-util.c
new file mode 100644 (file)
index 0000000..48183e3
--- /dev/null
@@ -0,0 +1,81 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2010 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "alloc-util.h"
+#include "util.h"
+
+void* memdup(const void *p, size_t l) {
+        void *r;
+
+        assert(p);
+
+        r = malloc(l);
+        if (!r)
+                return NULL;
+
+        memcpy(r, p, l);
+        return r;
+}
+
+void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) {
+        size_t a, newalloc;
+        void *q;
+
+        assert(p);
+        assert(allocated);
+
+        if (*allocated >= need)
+                return *p;
+
+        newalloc = MAX(need * 2, 64u / size);
+        a = newalloc * size;
+
+        /* check for overflows */
+        if (a < size * need)
+                return NULL;
+
+        q = realloc(*p, a);
+        if (!q)
+                return NULL;
+
+        *p = q;
+        *allocated = newalloc;
+        return q;
+}
+
+void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size) {
+        size_t prev;
+        uint8_t *q;
+
+        assert(p);
+        assert(allocated);
+
+        prev = *allocated;
+
+        q = greedy_realloc(p, allocated, need, size);
+        if (!q)
+                return NULL;
+
+        if (*allocated > prev)
+                memzero(q + prev * size, (*allocated - prev) * size);
+
+        return q;
+}
diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
new file mode 100644 (file)
index 0000000..12b602e
--- /dev/null
@@ -0,0 +1,108 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2010 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <alloca.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macro.h"
+
+#define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
+
+#define new0(t, n) ((t*) calloc((n), sizeof(t)))
+
+#define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
+
+#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n)))
+
+#define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
+
+#define malloc0(n) (calloc(1, (n)))
+
+static inline void *mfree(void *memory) {
+        free(memory);
+        return NULL;
+}
+
+void* memdup(const void *p, size_t l) _alloc_(2);
+
+static inline void freep(void *p) {
+        free(*(void**) p);
+}
+
+#define _cleanup_free_ _cleanup_(freep)
+
+_malloc_  _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) {
+        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
+                return NULL;
+
+        return malloc(a * b);
+}
+
+_alloc_(2, 3) static inline void *realloc_multiply(void *p, size_t a, size_t b) {
+        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
+                return NULL;
+
+        return realloc(p, a * b);
+}
+
+_alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_t b) {
+        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
+                return NULL;
+
+        return memdup(p, a * b);
+}
+
+void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size);
+void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size);
+
+#define GREEDY_REALLOC(array, allocated, need)                          \
+        greedy_realloc((void**) &(array), &(allocated), (need), sizeof((array)[0]))
+
+#define GREEDY_REALLOC0(array, allocated, need)                         \
+        greedy_realloc0((void**) &(array), &(allocated), (need), sizeof((array)[0]))
+
+#define alloca0(n)                                      \
+        ({                                              \
+                char *_new_;                            \
+                size_t _len_ = n;                       \
+                _new_ = alloca(_len_);                  \
+                (void *) memset(_new_, 0, _len_);       \
+        })
+
+/* It's not clear what alignment glibc/gcc alloca() guarantee, hence provide a guaranteed safe version */
+#define alloca_align(size, align)                                       \
+        ({                                                              \
+                void *_ptr_;                                            \
+                size_t _mask_ = (align) - 1;                            \
+                _ptr_ = alloca((size) + _mask_);                        \
+                (void*)(((uintptr_t)_ptr_ + _mask_) & ~_mask_);         \
+        })
+
+#define alloca0_align(size, align)                                      \
+        ({                                                              \
+                void *_new_;                                            \
+                size_t _size_ = (size);                                 \
+                _new_ = alloca_align(_size_, (align));                  \
+                (void*)memset(_new_, 0, _size_);                        \
+        })
index 93d1adaf99d556e509fe7af3173cc152d9f7fbb6..4612297334156aa325b62894603120c30e45be50 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index 2eabf3e1c1bbaf5d140c2fc1214bd74e80e2cad9..1449e2ea852504b682ac54fb4ea0a1775ae9c8ce 100644 (file)
@@ -19,9 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
-
+#include "alloc-util.h"
 #include "bitmap.h"
+#include "util.h"
 
 struct Bitmap {
         uint64_t *bitmaps;
index 7457e9f2181e551b89580cddc97c7882cfaf8dd4..4c90bc0c80bf3c2d04b833435575e575447c478e 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/btrfs.h>
 #endif
 
+#include "alloc-util.h"
 #include "btrfs-ctree.h"
 #include "btrfs-util.h"
 #include "copy.h"
index 6f39528f138ec7f3d2fd4b7618973ed20cf628fd..c1534657ac921124ca8939d62b3e7301ad269c4e 100644 (file)
 
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "bus-label.h"
-#include "macro.h"
 #include "hexdecoct.h"
+#include "macro.h"
 #include "util.h"
 
 char *bus_label_escape(const char *s) {
index 62b03a913c61334b410ca8cdc3525ee284eb1906..a6a906f453d9310de6ac2519755aeb4c4862b13f 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "string-util.h"
 #include "calendarspec.h"
 #include "fileio.h"
index 3a6ceed6f5132a995facc312072c30b7418462d7..4479200306364c3e88b5bf0b491ba8577f647326 100644 (file)
@@ -26,6 +26,7 @@
 #include <sys/prctl.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "capability-util.h"
 #include "fileio.h"
 #include "log.h"
index 0f0e144b5e28ccd3084c8aa9670d4cadcd353c2e..f7fc2c2c975d05dd0919a3b62ba69a74a37bbd4f 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "dirent-util.h"
 #include "extract-word.h"
index a3a4099b4d976c7c442a5db9684dcd9c9a0e0def..a187ae08fe6dd542168ffe57eb67b37f0d17fc0a 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/sendfile.h>
 #include <sys/xattr.h>
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "chattr-util.h"
 #include "copy.h"
index cbeae0bf20ab82a1effcf09c78e539cb8f65922a..9122ea5d4847096dc1e0bdabbc37c54b2a51a936 100644 (file)
@@ -20,6 +20,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "cpu-set-util.h"
 #include "extract-word.h"
 #include "parse-util.h"
index a392af737cf67c0cf0e4ff1223e8fec199518b43..94cb25169839d8ef39c554d50ee007f11a7845e2 100644 (file)
 #include <limits.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "def.h"
+#include "env-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "utf8.h"
 #include "util.h"
-#include "env-util.h"
 
 #define VALID_CHARS_ENV_NAME                    \
         DIGITS LETTERS                          \
index e763b5dac28f042c5a1ec827a3e8f7dd243f6383..add0d7795bc4e3af3413fec30168bfdfe2b3926b 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "hexdecoct.h"
 #include "utf8.h"
index f2b74802fa494ba0d40849d55dd2e68d04c635fa..c0f9394fadfa81d8d60a9c450363efeb372c12b1 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "utf8.h"
 #include "util.h"
index 3dfd3af8af612f1071aa7fdcf484686b5d4aad60..619dafb517e32bb656b6007c477abd171d3fa8c5 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "ctype.h"
 #include "escape.h"
 #include "fd-util.h"
index 6ad381afb4139f9a5821feed42b3ba571f5f06f0..7aee404bfcfadff1e5aca3084cf82efbb0f8b0e4 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index 015cc629b17bf9287c3d35fc1087575f4135b905..4109a08c6cafcc426bb4b18087122bed645481a1 100644 (file)
@@ -24,6 +24,7 @@
 #include <pthread.h>
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "hashmap.h"
 #include "macro.h"
 #include "mempool.h"
index f958582e68a96ccf4b2e343d1161ba0c1691ccc8..4eb566b15aadd0d5d9a2f6a6eee2fb6bed73c662 100644 (file)
@@ -22,6 +22,7 @@
 #include <ctype.h>
 #include <inttypes.h>
 
+#include "alloc-util.h"
 #include "hexdecoct.h"
 #include "util.h"
 
index d88864b5987f7387ebd99e2ea9a689d05038c478..f4e24121e7b80b8a0c49e1df2f81a2f45ea9dcc7 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <arpa/inet.h>
 
+#include "alloc-util.h"
 #include "in-addr-util.h"
 
 int in_addr_is_null(int family, const union in_addr_union *u) {
index efe635e20ecb139bc0d5540385bf20b28d349565..716705e5ff52a047549ce3d2c5a21df8508126d1 100644 (file)
@@ -22,6 +22,7 @@
 #include <math.h>
 #include <sys/types.h>
 
+#include "alloc-util.h"
 #include "json.h"
 #include "macro.h"
 #include "hexdecoct.h"
index 60235cc9723952850e16502c2c491f24deaebcd1..87c3aef7afebb52c1885b10e493af1f2c3b1a095 100644 (file)
@@ -27,6 +27,7 @@
 #include <limits.h>
 #include <sys/file.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 505c0d072c56edff3a24c3792bb538b6d9dc7dd0..1582fce61c75dc0a3fdbb9288f00f3fc743cedd7 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "io-util.h"
index 9d638b27f086df9ac9295458df0d06594bd77ec2..92630f6b2591b5e226599f73f35270ef7184bd31 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/mman.h>
 #include <sys/prctl.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "memfd-util.h"
 #include "missing.h"
index 24e88babcdc2216c63ad3d3f3dea26b064735b81..fefa50709cc13f76fd8de72437d4c17da238b0f6 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/mount.h>
 #include <sys/statvfs.h>
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
index 3783129f6950765f8a73810eb2da34d114356de5..ec90c432a4bdb48d5a906de58adef2f0eb8fc3e2 100644 (file)
@@ -33,6 +33,7 @@
 #include <libgen.h>
 #undef basename
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index d55b348c22f2ec82d13d2dacff33dcc3f808abb7..75906989114bc4add71ccf8cd602e06b552e4129 100644 (file)
@@ -29,8 +29,9 @@
  * The underlying algorithm used in this implementation is a Heap.
  */
 
-#include "util.h"
+#include "alloc-util.h"
 #include "prioq.h"
+#include "util.h"
 
 struct prioq_item {
         void *data;
index dd0e18ed6e7896b94e7407cf267c85d908ede591..dd91ce7dbcc57550ed7211854ad1855395257dc5 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "extract-word.h"
 #include "fileio.h"
 #include "macro.h"
index c5d7dc3089ea9f1383c8f78affdba93f5a257dd0..c534656c970ed57d8866631fae782698e8ef8b28 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
index 478fc43a38858ac34ff38b6564a4e49e04edd71a..18b49a9227ddf1f06edd6ed90d10b986d1b1574c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <string.h>
 
+#include "alloc-util.h"
 #include "macro.h"
 #include "util.h"
 #include "replace-var.h"
index 7a7dc90e3c471a12092614ce84a321bffc8dd40b..a821a3d5bb63e930eb14ca91ec562100725ae6e6 100644 (file)
@@ -29,6 +29,7 @@
 #include <selinux/context.h>
 #endif
 
+#include "alloc-util.h"
 #include "strv.h"
 #include "path-util.h"
 #include "selinux-util.h"
index a96fb5b59418c5d3d6c7403e6d6c0625fdc6a59d..fcc046098dcd4a8ecf83ac15cfced98660220141 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <sys/xattr.h>
 
+#include "alloc-util.h"
 #include "fileio.h"
 #include "path-util.h"
 #include "process-util.h"
index 4099ea6f9ff6254f5ea2b6565c0dc7988d822a6f..e5d4efc719e61326d7dab7bafdc9f58898848215 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "macro.h"
 #include "missing.h"
index ef5b764e60cf0d7c5dceabdc6699569453ed7126..1acab1ef95bab65534dad3bf0717a1b5e083235e 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index 01a076c2baf204e50f170bbcd2fbca44ed527f76..f4f702a05abd1775b7be27bb3ea26b50bfb47321 100644 (file)
@@ -22,8 +22,9 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "util.h"
+#include "alloc-util.h"
 #include "strbuf.h"
+#include "util.h"
 
 /*
  * Strbuf stores given strings in a single continuous allocated memory
index a1781c505aa63c0c88f74d18bb4045a4687f3782..63b9b79df9fa0e4e8fecf75ebdfbd375458ac124 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "gunicode.h"
 #include "utf8.h"
 #include "util.h"
index f5df269006a2f7be4ee1e6a396dc17857a3869b6..ba6df716a71c798e47396bfc97f45cae8a51dfd5 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "string-util.h"
 #include "util.h"
index 7d694e4664ec2a82a61a5ad14e6958adf7de0f93..b96bfcb8ef57cd4cd62e1e6b5c05be78160007ca 100644 (file)
@@ -31,6 +31,7 @@
 #include <time.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 867e7b2430a72da0ed2698a8cd5b1976d0ce1fb7..9dc280efc65d6236805fa042ffaa818d2207a0a6 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/timerfd.h>
 #include <sys/timex.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 43f52ce7c8eb0e8511b5d7497341c9f9b002a39b..0775ae7c14b0af12037eb20d3ada10dbcddfd573 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "bus-label.h"
 #include "def.h"
 #include "hexdecoct.h"
index bdee77a7d2802f856ca9bff523540502cebaae14..d6c936db370d93ce532c4693249dfa4af34f80d0 100644 (file)
@@ -22,6 +22,7 @@
 #include <pwd.h>
 #include <grp.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "macro.h"
 #include "parse-util.h"
index de124abbdebadcbad7141c617ed2c69909a11b48..7600d9990322149202df847b712a537e76963599 100644 (file)
@@ -49,6 +49,7 @@
 #include <string.h>
 #include <stdbool.h>
 
+#include "alloc-util.h"
 #include "hexdecoct.h"
 #include "utf8.h"
 #include "util.h"
index 6da311ad1e17cf3b08650330826d6544f8949537..62d58c13fdf9e803641d0f76e0b7d843d0a0fb4a 100644 (file)
@@ -69,6 +69,7 @@
  * otherwise conflicts with sys/mount.h. Yay, Linux is great! */
 #include <linux/fs.h>
 
+#include "alloc-util.h"
 #include "build.h"
 #include "def.h"
 #include "device-nodes.h"
@@ -487,19 +488,6 @@ int prot_from_flags(int flags) {
         }
 }
 
-void* memdup(const void *p, size_t l) {
-        void *r;
-
-        assert(p);
-
-        r = malloc(l);
-        if (!r)
-                return NULL;
-
-        memcpy(r, p, l);
-        return r;
-}
-
 int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...) {
         bool stdout_is_tty, stderr_is_tty;
         pid_t parent_pid, agent_pid;
@@ -725,51 +713,6 @@ int on_ac_power(void) {
         return found_online || !found_offline;
 }
 
-void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) {
-        size_t a, newalloc;
-        void *q;
-
-        assert(p);
-        assert(allocated);
-
-        if (*allocated >= need)
-                return *p;
-
-        newalloc = MAX(need * 2, 64u / size);
-        a = newalloc * size;
-
-        /* check for overflows */
-        if (a < size * need)
-                return NULL;
-
-        q = realloc(*p, a);
-        if (!q)
-                return NULL;
-
-        *p = q;
-        *allocated = newalloc;
-        return q;
-}
-
-void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size) {
-        size_t prev;
-        uint8_t *q;
-
-        assert(p);
-        assert(allocated);
-
-        prev = *allocated;
-
-        q = greedy_realloc(p, allocated, need, size);
-        if (!q)
-                return NULL;
-
-        if (*allocated > prev)
-                memzero(q + prev * size, (*allocated - prev) * size);
-
-        return q;
-}
-
 bool id128_is_valid(const char *s) {
         size_t i, l;
 
index 3074029f38b6a2e513a6704a0230bf3c52a218c7..e2fceafd9a7d7aa5407edc7633dd8f343ee874eb 100644 (file)
 size_t page_size(void) _pure_;
 #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
 
-#define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
-
-#define new0(t, n) ((t*) calloc((n), sizeof(t)))
-
-#define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
-
-#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n)))
-
-#define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
-
-#define malloc0(n) (calloc(1, (n)))
-
-static inline void *mfree(void *memory) {
-        free(memory);
-        return NULL;
-}
-
 static inline const char* yes_no(bool b) {
         return b ? "yes" : "no";
 }
@@ -118,60 +101,35 @@ bool kexec_loaded(void);
 
 int prot_from_flags(int flags) _const_;
 
-void* memdup(const void *p, size_t l) _alloc_(2);
-
 int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...);
 
 bool in_initrd(void);
 
-static inline void freep(void *p) {
-        free(*(void**) p);
-}
-
-#define _cleanup_free_ _cleanup_(freep)
-
-_malloc_  _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) {
-        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
-                return NULL;
-
-        return malloc(a * b);
-}
-
-_alloc_(2, 3) static inline void *realloc_multiply(void *p, size_t a, size_t b) {
-        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
-                return NULL;
-
-        return realloc(p, a * b);
-}
-
-_alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_t b) {
-        if (_unlikely_(b != 0 && a > ((size_t) -1) / b))
-                return NULL;
-
-        return memdup(p, a * b);
-}
-
 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
                  int (*compar) (const void *, const void *, void *),
                  void *arg);
 
-int on_ac_power(void);
+/**
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
+        if (nmemb <= 1)
+                return;
 
-static inline void *mempset(void *s, int c, size_t n) {
-        memset(s, c, n);
-        return (uint8_t*)s + n;
+        assert(base);
+        qsort(base, nmemb, size, compar);
 }
 
+int on_ac_power(void);
+
 #define memzero(x,l) (memset((x), 0, (l)))
 #define zero(x) (memzero(&(x), sizeof(x)))
 
-void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size);
-void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size);
-#define GREEDY_REALLOC(array, allocated, need)                          \
-        greedy_realloc((void**) &(array), &(allocated), (need), sizeof((array)[0]))
-
-#define GREEDY_REALLOC0(array, allocated, need)                         \
-        greedy_realloc0((void**) &(array), &(allocated), (need), sizeof((array)[0]))
+static inline void *mempset(void *s, int c, size_t n) {
+        memset(s, c, n);
+        return (uint8_t*)s + n;
+}
 
 static inline void _reset_errno_(int *saved_errno) {
         errno = *saved_errno;
@@ -225,45 +183,8 @@ static inline unsigned log2u_round_up(unsigned x) {
         return log2u(x - 1) + 1;
 }
 
-#define alloca0(n)                                      \
-        ({                                              \
-                char *_new_;                            \
-                size_t _len_ = n;                       \
-                _new_ = alloca(_len_);                  \
-                (void *) memset(_new_, 0, _len_);       \
-        })
-
-/* It's not clear what alignment glibc/gcc alloca() guarantee, hence provide a guaranteed safe version */
-#define alloca_align(size, align)                                       \
-        ({                                                              \
-                void *_ptr_;                                            \
-                size_t _mask_ = (align) - 1;                            \
-                _ptr_ = alloca((size) + _mask_);                        \
-                (void*)(((uintptr_t)_ptr_ + _mask_) & ~_mask_);         \
-        })
-
-#define alloca0_align(size, align)                                      \
-        ({                                                              \
-                void *_new_;                                            \
-                size_t _size_ = (size);                                 \
-                _new_ = alloca_align(_size_, (align));                  \
-                (void*)memset(_new_, 0, _size_);                        \
-        })
-
 bool id128_is_valid(const char *s) _pure_;
 
-/**
- * Normal qsort requires base to be nonnull. Here were require
- * that only if nmemb > 0.
- */
-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
-        if (nmemb <= 1)
-                return;
-
-        assert(base);
-        qsort(base, nmemb, size, compar);
-}
-
 int container_get_leader(const char *machine, pid_t *pid);
 
 int namespace_open(pid_t pid, int *pidns_fd, int *mntns_fd, int *netns_fd, int *userns_fd, int *root_fd);
index 19f93b95aadf709546ea3240710eee3c85162347..fb181e5b55ee58102ad57706512d174faed3afc4 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fileio.h"
-#include "stat-util.h"
 #include "process-util.h"
+#include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "util.h"
index 7351337c6b04924f02bc64d82becbafec62fbbc6..6abdaedc3e7aa5e0753d1c7326093581606f7c1a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/xattr.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "sparse-endian.h"
 #include "stdio-util.h"
index b96695c353cf354ebde77307b0c8eff798faa8fd..8e63153c9273c47f76f0c9c7c5c9b04f35c71ff1 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "fd-util.h"
 #include "fileio.h"
index 332bb335455cb442bea1fad97b88859461a338eb..4cf42d17f34b76b6dc71e317990966297af888aa 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/statfs.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "blkid-util.h"
 #include "efivars.h"
 #include "fd-util.h"
index c0019174ab8583c5214b411c5b9c1e0e89f970fd..6723fa509868334767ba4d793dffab2fc94f4193 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "bootchart.h"
 #include "conf-parser.h"
 #include "fd-util.h"
index e488c94b3b9137073f26403bf68698b91959ba81..c1b1e77e4476a0c1cc7a3394cc6a435622f955b9 100644 (file)
@@ -31,6 +31,7 @@
 #include <time.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "bootchart.h"
 #include "cgroup-util.h"
 #include "dirent-util.h"
index 43eca906188c30946ddb608c608a46c47eb135bf..05330c057799a2a029a0272fcdfaa90b001a4806 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/utsname.h>
 #include <fcntl.h>
 
+#include "alloc-util.h"
 #include "architecture.h"
 #include "util.h"
 #include "fileio.h"
index fc8edaeb36c47443e948b38164ba1ebb831bff37..6a7134644fda775d57bc8d3ab5d64993407777f0 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-xml-policy.h"
 #include "capability-util.h"
index 1b9fdedca3747c91bea728b49e8a29936398c426..f0834e95257dd5c87b5c7bddb9d1d55fdc31a1ab 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-login.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-xml-policy.h"
 #include "conf-files.h"
index 4e859412f87686e8e51df62c82b573e394d86cf3..2e8bd83efde9a8ba6c7cece46980b45c01079148 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-message.h"
 #include "bus-util.h"
index 6c251b52445d7d5a7b4df2f9a02f776df898dbdd..db399b24f26d41d7685c2210d4cba4e3dbe949c8 100644 (file)
@@ -31,6 +31,7 @@
 #include "sd-bus.h"
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-control.h"
 #include "bus-internal.h"
 #include "bus-message.h"
index a009ea76c4f1eeb31f246ef030da0da80de6a21b..6e478842093f1aaeaf691cc02160a849432416c6 100644 (file)
@@ -30,6 +30,7 @@
 #include "sd-daemon.h"
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-util.h"
 #include "def.h"
index cb7ff6b9700b8ad117a867ec0b203f25119d429a..1f465edd9178ec566abb43b0fe04b330c31df916 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-xml-policy.h"
 #include "log.h"
 #include "string-util.h"
index 41c539a1bc5055b214f00ba88e57d3eed3eee835..4e9a76a100d535ac099e26629ed516f757b650d9 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-show.h"
index 43b8af44203dc53faa264c700fabb45e712e1137..eea8aea76bc248f3968e67d7f928e6193e585b52 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
index 50a77727535096b1c174210a6fc597ef3c7f0f08..715e52e794755952fa87c69774cb8d812dbffd77 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "async.h"
 #include "automount.h"
 #include "bus-error.h"
index 0c4b3e7c8b6464870725e3f41b0c71e6d8c5f930..d22a80c91faeb245adf622938ae5eee409e92bba 100644 (file)
 
 #include <stdlib.h>
 
-#include "kdbus.h"
+#include "alloc-util.h"
+#include "bus-endpoint.h"
 #include "bus-kernel.h"
 #include "bus-policy.h"
-#include "bus-endpoint.h"
+#include "kdbus.h"
 
 int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep) {
 
index 7ad18fb28c120aa240b5c8a79a9d4e6b1006b190..4907c268e8c03f8e3cb4d7aa42c431a9c8bcfcbd 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "bus-kernel.h"
 #include "bus-policy.h"
 #include "kdbus.h"
index 94674c99fa2b94c35cacaf5287442d641da215a1..9fed54ffc8d582a027696a5a8cc95c00afe23b33 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/mman.h>
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-kernel.h"
 #include "bus-policy.h"
index 0d37e69cd9efc062cd4274f8138e26146d23fc7e..90cee12be755f4f04ac95fd3891951a6dd45b7de 100644 (file)
@@ -22,6 +22,7 @@
 #include <fcntl.h>
 #include <fnmatch.h>
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "cgroup.h"
 #include "fd-util.h"
index f424909b46d3ba6b2224a631abb174e8e8e1a4f7..3fd295baa918dcad83079ec2e0c6416683ca2a7c 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
 #include "cgroup.h"
index 67405a16726fce98b9b2f03a21b4a1858551a8a0..882a76e9889d5ed2ec1309c0878631be607a2b42 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 
 #include "af-list.h"
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "capability-util.h"
 #include "dbus-execute.h"
index e95ec5c0cbfe31bc27c668228566811e255c5bff..8c30d6625000a148c8f743d58434591af5f704f4 100644 (file)
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
+#include "dbus-job.h"
 #include "dbus.h"
 #include "job.h"
 #include "log.h"
 #include "selinux-access.h"
 #include "string-util.h"
-#include "dbus-job.h"
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, job_type, JobType);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_state, job_state, JobState);
index 3f631bd9a0feede575f6266f8f972115e2b2b55f..1f9f25093d39e525db0787046ff3bbfd463adcd7 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/prctl.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "architecture.h"
 #include "build.h"
 #include "bus-common-errors.h"
index f8fb373bf01e8a45be62c08729cc8582cb789ac1..16375b2311b755f8585c7d33941ccf117c990d54 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "selinux-access.h"
-#include "unit.h"
-#include "scope.h"
-#include "dbus.h"
-#include "bus-util.h"
-#include "bus-internal.h"
+#include "alloc-util.h"
 #include "bus-common-errors.h"
-#include "dbus-unit.h"
+#include "bus-internal.h"
+#include "bus-util.h"
 #include "dbus-cgroup.h"
 #include "dbus-kill.h"
 #include "dbus-scope.h"
+#include "dbus-unit.h"
+#include "dbus.h"
+#include "scope.h"
+#include "selinux-access.h"
+#include "unit.h"
 
 static int bus_scope_abandon(sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Scope *s = userdata;
index 91cdeb1f30b21bbff9778349ae15e797e3dc6cb8..c41b3e1723ab3105ace6d5f5feab6c3169b6e7a0 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "async.h"
 #include "bus-util.h"
 #include "dbus-cgroup.h"
index 5941b72bc0b7ee8e3ee25676d7ab6661c18d9a39..be5ef261a654283335f3192df513997cf138fb9a 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "dbus-cgroup.h"
 #include "dbus-execute.h"
+#include "dbus-socket.h"
 #include "socket.h"
 #include "string-util.h"
 #include "unit.h"
-#include "dbus-socket.h"
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, socket_result, SocketResult);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
index 8ea2cf84a493906b932f2461e3c03acc1da4633a..a8a280d961202c684d87615652213241d5dbb660 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "unit.h"
-#include "timer.h"
-#include "dbus-timer.h"
+#include "alloc-util.h"
 #include "bus-util.h"
+#include "dbus-timer.h"
 #include "strv.h"
+#include "timer.h"
+#include "unit.h"
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, timer_result, TimerResult);
 
index 10cd80389bd179f5d6d93c8fb70c18861bef5117..6320cd1aa95f57e6f4e5457507aac28ce6ed523b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "cgroup-util.h"
 #include "dbus-unit.h"
index bbab0aeddbe1ac5d57e63e1a246757bc5ac271f0..834745aeb5954d2cf28b52e62217bb8a0ef208d6 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-internal.h"
index 90bb2c45fda79628c5922c9ff3822c1f859a6959..23ee7aee7ef7213ce30f3fb88c1f1976c2d3d9c9 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "dbus-device.h"
 #include "device.h"
 #include "log.h"
index bf13e29bd9bb12e02d5736cbdd96aac7042f4b85..d751065af08af847aeb6d12c343345ade93ad159 100644 (file)
@@ -53,6 +53,7 @@
 #include "sd-messages.h"
 
 #include "af-list.h"
+#include "alloc-util.h"
 #ifdef HAVE_APPARMOR
 #include "apparmor-util.h"
 #endif
index f1563afff90b25ad91378ad310cc914978316d24..cc7515905d5f5bf84033df7ae34d4d24d6c18983 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "fileio.h"
 #include "hostname-util.h"
 #include "log.h"
index 44532d0d5a9d953df5c32a0acb9f42a3ba7e6d6b..120381fc3b6de43fb6d01b609bb478b34ed92877 100644 (file)
@@ -24,6 +24,7 @@
 #include "sd-id128.h"
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "async.h"
 #include "dbus-job.h"
 #include "dbus.h"
index dbfa90ebacb6f83565784bb99d8368e21d80ee43..77f145b4d1a006057b9415f1f097c2ef26d7d712 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "killall.h"
index 72e918ed54cb1045d4c337b6a684339cde7ddbe8..c1d09e8e5a2bef4a740024b2779a7e871d428199 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/resource.h>
 #include <sys/stat.h>
 
+#include "alloc-util.h"
 #include "af-list.h"
 #include "bus-error.h"
 #include "bus-internal.h"
index d00d3e94bbd0072634f1e596cb4fc726cd27322e..145ba2a28df62f98bf6c6334d419b746b64866e7 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index d9c888d747eab4e95283951f1b4c52a7e65e9bd6..593b974566dd2ab37eb2cd3a45587a30fc8f8ab9 100644 (file)
@@ -40,6 +40,7 @@
 #include "sd-daemon.h"
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "architecture.h"
 #include "build.h"
 #include "bus-error.h"
index bf0cf069ca2afb7992adf93f74ad2c1e8d36854c..04111091e70f0640d477d246d947ac5af526341f 100644 (file)
@@ -40,6 +40,7 @@
 #include "sd-daemon.h"
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "audit-fd.h"
 #include "boot-timestamps.h"
 #include "bus-common-errors.h"
index 1ab4ee5b1a8a1bd55abe4f4f7764560dda37c0b8..b2596d1cd199e55aab1167565b4e38863e1e6d29 100644 (file)
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <ftw.h>
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
 #include "dev-setup.h"
index f04f3869303883bc368e162d59fd347c90155d15..68cf312fcafaa923728e023a8bb6bc7c4419869b 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "dbus-mount.h"
 #include "escape.h"
 #include "exit-status.h"
@@ -40,8 +41,8 @@
 #include "path-util.h"
 #include "smack-util.h"
 #include "special.h"
-#include "string-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
 #include "unit.h"
index 6c49ff32feb307460ca1266357e4c3117ee92016..81ba09ea5ddf9166e493455ae030e9013a710d4a 100644 (file)
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <linux/fs.h>
 
+#include "alloc-util.h"
 #include "dev-setup.h"
 #include "fd-util.h"
 #include "loopback-setup.h"
index 13de02cf16fbe04a164eb7741c62703905cbf65b..6bacb226e8887d2a9cdc97a54774b88356d7c430 100644 (file)
 #include <errno.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "dbus-scope.h"
 #include "load-dropin.h"
 #include "log.h"
+#include "scope.h"
 #include "special.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
 #include "unit.h"
-#include "scope.h"
 
 static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = {
         [SCOPE_DEAD] = UNIT_INACTIVE,
index a9368ead22db5389ef0396e76085a2282ed135be..4bcdd273899d2080166dbbbb6c3cb1895c7f1612 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "audit-fd.h"
 #include "bus-util.h"
 #include "log.h"
index 54a420d6f09d76f872fb4dc048908b9454e29812..2d92799fec4c831a3b6e58eb9a11b5f978a51e82 100644 (file)
@@ -23,6 +23,7 @@
 #include <signal.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "async.h"
 #include "bus-error.h"
 #include "bus-kernel.h"
index 81166abf2312265d3e8a04b8c5ad3ec2dd45e70d..e4e12a33650c01aa34a42c98a07a98c5baad78a3 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "parse-util.h"
index 93bbc315d36ac8e08fbe4268a2d57fcb76821a07..3a95b5fd72c859a5d31f3b6199dc780556acf885 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "def.h"
 #include "fileio.h"
index 8fb6d28a3cbfca0c55cd04a004f68a70f18090f9..460214415030e24f474550bde6c05fd8f89a9f44 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 
+#include "alloc-util.h"
 #include "dbus-slice.h"
 #include "log.h"
 #include "special.h"
index b8cb9964a6a18cdac1e3351bb9f87d7fb9f909d1..0661ff9ecd5214f95010c21c3d73d4b6727e1fca 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index da1c99ad12e0f05fcca724ee105784f14173a51c..ba3135f401c79f02b3fd70286f6fa9e5f040b8d7 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "dbus-snapshot.h"
 #include "parse-util.h"
index c145aa6081fb087d53f40c1171e68fd1bb65a45a..d8b8cf576aa9ad825e9cf9fd3071e0cd62a9bf7f 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "copy.h"
index cb2da1cb5c53803030ee2aa64b0d0b51dbe56277..5be3c709bf0545f663409d81bfcb2027d3dda807 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "dbus-swap.h"
 #include "escape.h"
 #include "exit-status.h"
index 47e501815ad3ac7813c9804d176c43024a8ccde1..cc2afedabf796cbe21a7c83a16e70090d21a1787 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "dbus-timer.h"
index d1c1b9a3cd3320ad0caf6a3f669fa4c50d15040d..69f28c902f621d3c92be94ed686d0ddc45010ec7 100644 (file)
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
-#include "transaction.h"
 #include "terminal-util.h"
+#include "transaction.h"
 
 static void transaction_unlink_job(Transaction *tr, Job *j, bool delete_dependencies);
 
index 8735bed7b17f41b11a6d2fa5a660fcca74c72b38..9d1f7660db7bc11569cb87b2b9886775a305f4fd 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fstab-util.h"
index 4a5c7efdb0ed3e3fe462ae1c8e6c94b8b88fa6e1..721c8ccce9ad339c7d7b2c2ecbcbaefa79f35f36 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "formats-util.h"
 #include "macro.h"
index 11d3bb9633c2323f19df066c21fc8d126ec0edad..8d56401231e4a8dd5a54ceead076d552b4d0bdf4 100644 (file)
@@ -28,6 +28,7 @@
 #include "sd-id128.h"
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
index 54a89452a356e94eb38856281092e71261751b3a..ae53bac60094f78dbef6a3b8c5338d7c74e0bdac 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <errno.h>
 
+#include "alloc-util.h"
 #include "dropin.h"
 #include "fd-util.h"
 #include "fileio.h"
index 8531b6b1251522a7f8eefaa3e9b40fa685249b9e..98fe52a81bbe81de5b715b8351920e2a1c031d75 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "ask-password-api.h"
 #include "device-util.h"
 #include "escape.h"
index 66a0fe9ea229345967cea9f78ff8d8cbfb936cc0..b57bf9a57d3ed5756a6192fae2ffdc15228496d2 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
index 1a98cbaef872985471d0bfc0e09d710ece79ec1c..e16c3b9453318e78563dd3fee60bcf7e765d3613 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "mkdir.h"
 #include "parse-util.h"
 #include "proc-cmdline.h"
index 4ade23ffabc33f9b3ee3c9c3fbb4b740c5c50c23..6c25b185ed88d63713fce492122a082ec6eaf131 100644 (file)
@@ -26,6 +26,7 @@
 #include <sys/prctl.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
index 9390558554eae1915040708a0e504581b08d5bc6..e857affbc423830b4d2d76b785d9e2d430be9e09 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "log.h"
 #include "string-util.h"
 #include "strv.h"
index 30ea942d142ef3f19d0371d0b954bb4806aa673b..46cfe9f85102b739cb3f57efa4041e5ef36a9bae 100644 (file)
@@ -24,6 +24,7 @@
 #include <shadow.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "ask-password-api.h"
 #include "copy.h"
 #include "fd-util.h"
index 4119edde3096a4764c585b085e4623bcb392112d..5b806a1e69168380db3eb29f1c4fa76132b5dce2 100644 (file)
@@ -32,6 +32,7 @@
 #include "sd-bus.h"
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
index a51ecd9f7a5ed6ebb13d6c4d5585acf72ad34db4..f7c8d11ace19b3a05e244de34425a8d24d80ba1f 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fstab-util.h"
index 0997cc5faebbbd23ee936b2ceffd9bb24499408c..03df7365b56d2683a0cf8cef5a23b10b11929c7d 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
index cc1bd3f50eb29046102c7abe43e5c0aa6b9389ad..5ea6c86898d3a445c0b8b27cb2921ac74b6080e7 100644 (file)
@@ -27,6 +27,7 @@
 #include "libudev.h"
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "blkid-util.h"
 #include "btrfs-util.h"
 #include "dirent-util.h"
index 8c3a09501f00befba09a7a1c622ccb309ffd247e..da719f2a3064e1a096b3a4b911108908f5731944 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "fstab-util.h"
 #include "log.h"
 #include "mkdir.h"
index 1f3b1699056dcb52014c11ad7fb325ff1cbf1fee..316a2803d31fb25ad3db8b91482df8885e7a0726 100644 (file)
 #include <errno.h>
 #include <sys/stat.h>
 
+#include "alloc-util.h"
+#include "fileio.h"
 #include "log.h"
 #include "util.h"
-#include "fileio.h"
 
 int main(int argc, char *argv[]) {
         struct stat st;
index 0724fcc16dbe88036596ebddc1e090c103e6bbc2..bf09fb8fbb31f7635f11d3154b00262a05101cb2 100644 (file)
@@ -28,6 +28,7 @@
 #include "sd-bus.h"
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "architecture.h"
 #include "bus-error.h"
 #include "bus-util.h"
index 5c63a025a33feb9bca8a7f679d08939ba351e40b..92061532b8e2074d0d5a4c03889838656c96e79a 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <sys/utsname.h>
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "def.h"
 #include "env-util.h"
index 48d0883a3a6eea6b4a2c00fef9bcf5fc98f7d8cb..de59b797a6e80288c09db2b2deecf1e3c21f7ab8 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "fd-util.h"
 #include "fileio.h"
index 455fa1e07d6d0ccdd0dff8885f89c5da343a2259..4278466df120ee1bac9077761f86cebf27c913b8 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "curl-util.h"
 #include "fd-util.h"
 #include "string-util.h"
index 85e781a3085c8633a31b62e5f6c10f18bf20017e..103d45bf218b2028130253d320144d52814cb72b 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "copy.h"
 #include "export-raw.h"
index 38e659a517ebadbb1cc3cab7345fc7230f610e4e..2bbec661e66be4e7ebf9aa450fc8a5af9db18e5a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "export-tar.h"
 #include "fd-util.h"
index 6ff732d73f9b744669de4399f31954debeaa55d1..2b33d778d3b4d8ef36f88e68a604ef5656f234cc 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "export-raw.h"
 #include "export-tar.h"
index 87f4a3935d58700fa24f035e66be9ccd51fb68a8..2193d1d7f151b57c1c4f44c25a65eeb663942b24 100644 (file)
@@ -24,6 +24,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "chattr-util.h"
 #include "copy.h"
index 64eb5ccd8337d4835a599eac54afeb7a9f136214..2ae1d8816816c83a9039682ad873f72eeda1d0e7 100644 (file)
@@ -24,6 +24,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "copy.h"
 #include "fd-util.h"
index 76b38e4903dbce6be60ef03075746c08989b4cc4..018b94d4c43a3fe09c9f744f532824ada7e181c9 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
index 65e235464030cbf8c85bdf412d87384faebf5707..4228681ceae3e17a2dd48e77a04b8e3dbd13cc02 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-util.h"
 #include "def.h"
index c23584882152df355d0847db6b64c281d4838c41..d6567ba7eec6c4f9c1991d65b5ddac4d176acd8c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/prctl.h>
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "capability-util.h"
 #include "copy.h"
index 786651d581cf8003668b57c3712058753bbcf382..831470ff132f513e2769d3a21c7a209d75c0dfc5 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "aufs-util.h"
 #include "btrfs-util.h"
 #include "curl-util.h"
index 3cc7ea10b7bda689c21dad23b5977c614eae3944..824fa246ec5486bab7c6e2129e11d7b5b93d4c64 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/xattr.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hexdecoct.h"
 #include "io-util.h"
index c3476714c85c26de663cab7d1bbbb0478fc7af98..394131680d417e7d63172237f7337766f8b9eee2 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "chattr-util.h"
 #include "copy.h"
index 43b7b65586959a450b29c95b9e55b8b04984cfd8..26c0bc5866ddc74bf304c9c0c9dc6298d3167b09 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "copy.h"
 #include "curl-util.h"
index 5e6cd50688f25b269e9040f1695ad81ccdd848b5..39f5b2d8e4415c93e7b8668730a1721ba84d205a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "hostname-util.h"
 #include "import-util.h"
index fd3cf1b0e3bd5a8943a1d725d2aba7ce49830fb2..47dabaa86efaee93e0028a08ac4bba6aaf505d95 100644 (file)
 
 #include <zlib.h>
 
-#include "util.h"
-#include "sparse-endian.h"
-#include "qcow2-util.h"
+#include "alloc-util.h"
 #include "btrfs-util.h"
+#include "qcow2-util.h"
+#include "sparse-endian.h"
+#include "util.h"
 
 #define QCOW2_MAGIC 0x514649fb
 
index 2b374c0288759c9ccbbee4393c8547760a9a2e67..f1cf31a4a8f94da046dba4234bfe3ff798771280 100644 (file)
@@ -28,6 +28,7 @@
 #include "sd-bus.h"
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "def.h"
index b8a513bb749c665f228d71b351156aee1b7f0afd..6b93a758f65b3deb77630f710235b1285ad9d743 100644 (file)
@@ -33,6 +33,7 @@
 #include "sd-daemon.h"
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index db1636ac3e6ce1be9262ae4301d7e24ad063cdb4..3ff40228a0d3f6a395d5084099dea958349f3671 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "journal-remote-parse.h"
 #include "journald-native.h"
index 40f4ff8e58cf3238e68e95cc09c029f032c2f22c..d8250378b09508be738d83c00b2a5e4318cfedd3 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "journal-remote.h"
 
 int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) {
index f70d278e1c02839799b1df78f8d3ff407b0c693c..a2c49b8b4d1ec7c35be029a76b6cfd6222c244b9 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "escape.h"
 #include "fd-util.h"
index 6b3ad924a736126b51b6580a6941fe1554fab1a2..3ee6d32bf72fb76750d3ca2a389dbf11d546b88e 100644 (file)
@@ -1,11 +1,33 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew JÄ™drzejewski-Szmek
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
 #include <stdbool.h>
 
 #include <curl/curl.h>
 
-#include "util.h"
+#include "alloc-util.h"
+#include "journal-upload.h"
 #include "log.h"
 #include "utf8.h"
-#include "journal-upload.h"
+#include "util.h"
 
 /**
  * Write up to size bytes to buf. Return negative on error, and number of
index 1925475db8be84e604c88ab29b0067b65ef05e2f..7d274d2fc93c865d462414ff641e49861b2305b4 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "fd-util.h"
 #include "fileio.h"
index df068a089caabfa10ece31ced92cfda9a3fbbe7d..b2c398a845b83e0baf7c33b66c2d5a1cf8e8cc24 100644 (file)
@@ -29,6 +29,7 @@
 #include <gnutls/x509.h>
 #endif
 
+#include "alloc-util.h"
 #include "log.h"
 #include "macro.h"
 #include "string-util.h"
index 72d2bedc2673a56e0633687634fad473091e0d7b..95a685747215a09a218db7c86161753fe4a8472f 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "catalog.h"
 #include "conf-files.h"
 #include "fd-util.h"
index 196d6ff4252a4ae46cf5f24b5b9f162cab106cf9..e1ca0a8818edd6cbc6394e2ac1e8735b58f366cb 100644 (file)
@@ -33,6 +33,7 @@
 #include <lz4frame.h>
 #endif
 
+#include "alloc-util.h"
 #include "compress.h"
 #include "fd-util.h"
 #include "io-util.h"
index 9635db19e19a2f2b278444843f67182cf0966a5d..39bc2e4270909cae4e240a911f5df5f71087a270 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/statvfs.h>
 
+#include "alloc-util.h"
 #include "coredump-vacuum.h"
 #include "dirent-util.h"
 #include "fd-util.h"
index f32e2d4a9f32212dfbe9eaa0a3918596b9bef9ed..2e543537f6cf47aeeb7c21b8683d147c5c83755c 100644 (file)
@@ -34,6 +34,7 @@
 #include "sd-login.h"
 
 #include "acl-util.h"
+#include "alloc-util.h"
 #include "capability-util.h"
 #include "cgroup-util.h"
 #include "compress.h"
index 07ca8dde0a5e4140d0130208c1c5030d80fff13e..af4d051138ffed0ed8aab9cbaef6692d0a73d479 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "compress.h"
 #include "fd-util.h"
 #include "fileio.h"
index 6f9b8a2915059ce560cbd1dc72fdcfe628c31cf3..12b39dbb278acd0c0b097234e773403c0423cf35 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "chattr-util.h"
 #include "compress.h"
index 8fe99fae99a7361a0758ca9d807b4d073dce3200..fa5dee73c31f027b58a8ac16feb9ec7482bca107 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "io-util.h"
index 87646922fb4498dd5b7f75632d379d2520bf4a96..4b5fc76eb14f8ad9a62aee52ba88000eff428209 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "journal-def.h"
index 5d000aedbbc116ea1d74efa5853e592e26d3a07f..b78ce98b1754e506aaf44a8dc18ada14dd3fc9b0 100644 (file)
@@ -24,6 +24,7 @@
 #include <fcntl.h>
 #include <stddef.h>
 
+#include "alloc-util.h"
 #include "compress.h"
 #include "fd-util.h"
 #include "fileio.h"
index 2782ac032945e217b83e3001fd205fcaff3e93b5..a35783e3ff2e8bfa1b67c38b69ef0fe017dd5f19 100644 (file)
@@ -39,6 +39,7 @@
 #include "sd-journal.h"
 
 #include "acl-util.h"
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "catalog.h"
index 6a8ef7dd4059b1d817cd2d810623e241cb199201..3c13fe0d675c56a654709ba9b64348d0d376977c 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "audit-type.h"
 #include "fd-util.h"
 #include "hexdecoct.h"
index 72c4ba587961e991cb6b267733a521be0051ad20..860832cfc80b03a2ef7d0709ea48d94ff4ed2303 100644 (file)
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <sys/socket.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index 9f3b1e3b16619134eca5a7e31f8ce33ee4969086..6fff4fe4733ec3f08fd78f7dc0fad15294a95956 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "io-util.h"
index 6e9557c06e6aa554b35b93a5bb8a862dda2c0cb5..434ddc8ac91e7815242cfacdc4076685ad55a098 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "hashmap.h"
 #include "list.h"
 #include "random-util.h"
index 03cc074e7a87e23d02bab475a3d0c3bb0c8f75ef..ecf7b7a47669f453cea57230e5fa2d1ce7e953e7 100644 (file)
@@ -34,6 +34,7 @@
 #include "sd-messages.h"
 
 #include "acl-util.h"
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "cgroup-util.h"
 #include "conf-parser.h"
index 0dd6d54d68b9165b403ed566567333355d72856c..5300c61c022255f24f38e588b38c1da9097ae811 100644 (file)
@@ -29,6 +29,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "escape.h"
 #include "fd-util.h"
index 3553e9cc1d6a1079c377f8196ceb3023a4362601..f3ac1a7ae061b4a9315e2e8c891517fef1cf21ec 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "io-util.h"
index 5284914941f3091140cf43fc8f905cd4d979aa79..69540f11416b727bb5d9fc8ddb2524a3a79daa37 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "formats-util.h"
 #include "journald-server.h"
 #include "process-util.h"
index 22f75540b83f948d0d7e3604b4317c22ed809baa..3cb1dfa986a5189976398fac9a1fe718fff6f189 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <sys/mman.h>
 
+#include "alloc-util.h"
 #include "hashmap.h"
 #include "list.h"
 #include "log.h"
index bd93d9077675e1411200a2fb0add7d6afec180c7..6eda5162c7350d379372a1619f0d4438bf2d7cab 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "catalog.h"
 #include "compress.h"
 #include "dirent-util.h"
index e32550d6448539c2351749c798d8ad05d852d8be..4305462f809dc1ea01b5996cd1dbb0b5d90f932a 100644 (file)
@@ -22,6 +22,7 @@
 #include <dwarf.h>
 #include <elfutils/libdwfl.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "macro.h"
index c942df46a821c43a6c65811ed1d1bd55a1c6307c..aea8fd15e6a1647c51db5520b6d9b52fae76ec75 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "catalog.h"
 #include "fd-util.h"
 #include "fileio.h"
index 5a2f0564ca49b9a656aaf73513158d7707e40559..93ea9c6318fb4437b7ee7f2a2fa17d492cbe64c8 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "compress.h"
 #include "macro.h"
 #include "parse-util.h"
index db4fa1555412b3c6e4c32dd27e04780195c552cf..b9d90a89887f976d8cf685600187ca060bd4615d 100644 (file)
@@ -17,6 +17,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "compress.h"
 #include "fd-util.h"
 #include "fileio.h"
index 6061623ae77305d3c85a4ebbfdfc8a7eb7b2fa83..03d1522e235b2536ac37ab156d1a3f23f0285647 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "journal-file.h"
 #include "journal-internal.h"
 #include "macro.h"
index 3c8b0268a4ab268849b42531bbb312f2f0afe240..4ad89fe4b6a33126953c5cea351a5dea857a3fa4 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "journal-file.h"
 #include "journal-vacuum.h"
 #include "log.h"
index 476477055af769edcc4ded4f19df568b85ae63b2..abefedb992f1a07a4f1e6d705150add83a018752 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "journal-internal.h"
 #include "log.h"
 #include "string-util.h"
index b8482743a2c5841796d84d645cbbe06d63475609..0cbef4b8c56c70297bfce1af743fe8b9bb96f569 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-journal.h"
 
+#include "alloc-util.h"
 #include "journal-file.h"
 #include "journal-internal.h"
 #include "log.h"
index de942c50cc82c3f614cb36fab52068d39e38d672..1784187fe9317be0c720c23195b81450820373b0 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "journald-syslog.h"
 #include "macro.h"
 #include "string-util.h"
index f41bebced0f1583a0c6e603e40c3b3380cdd7e5d..076bb2dac05aff0576e1f833f921bf3e0f963d24 100644 (file)
 #include <errno.h>
 #include <string.h>
 
-#include "sparse-endian.h"
-#include "unaligned.h"
-#include "util.h"
-#include "strv.h"
-
+#include "alloc-util.h"
 #include "dhcp6-internal.h"
 #include "dhcp6-protocol.h"
 #include "dns-domain.h"
+#include "sparse-endian.h"
+#include "strv.h"
+#include "unaligned.h"
+#include "util.h"
 
 #define DHCP6_OPTION_IA_NA_LEN                  12
 #define DHCP6_OPTION_IA_TA_LEN                  4
index 70061e914f343c065263d1577ef60f1e3f0377b9..583be2f55d9b0adcf82d44684ce91bf1b322b19b 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "sd-lldp.h"
 
+#include "alloc-util.h"
 #include "lldp-internal.h"
 
 /* We store maximum 1K chassis entries */
index 7486b4c38f24d83cb4dd1bef8cf915f7cfaaddea..97b6b485d264310c75914f403fdb857c72e6b7d8 100644 (file)
@@ -20,6 +20,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "async.h"
 #include "lldp-port.h"
 #include "lldp-network.h"
index 66af22e37dd7fd64a8dffb4fdf2980eb176589fb..0851957ab4557ec35bb63fb8f4719fa155c1bfb8 100644 (file)
@@ -23,8 +23,9 @@
 #include <net/ethernet.h>
 #include <arpa/inet.h>
 
-#include "macro.h"
+#include "alloc-util.h"
 #include "lldp-tlv.h"
+#include "macro.h"
 
 int tlv_section_new(tlv_section **ret) {
         tlv_section *s;
index d86977be1799fcc3b90a3c7843fa60e52291caab..52d76e443ec5ad25562fcbbdda9daeb369faa3b1 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-ndisc.h"
 
+#include "alloc-util.h"
 #include "condition.h"
 #include "conf-parser.h"
 #include "dhcp-lease-internal.h"
index a6d6a176e419aed4fdd8bf31096434a3cfd4a51f..57fc8216c31233101fe65036774bd1d50ef0f3c1 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "sd-dhcp-client.h"
 
+#include "alloc-util.h"
 #include "async.h"
 #include "dhcp-identifier.h"
 #include "dhcp-internal.h"
index 3411f6ec91c9bc25eb0c9270ff4452f6b85d5bb1..c850538d743b24ff52201660b1d6334bd39c6403 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-dhcp-lease.h"
 
+#include "alloc-util.h"
 #include "dhcp-lease-internal.h"
 #include "dhcp-protocol.h"
 #include "dns-domain.h"
index a2a8c16fc8a69dcc6e9a1f1e6a38627ab7c4ced3..8d0d9955c332d14aac09d816c819ac6c86ae3146 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-dhcp-server.h"
 
+#include "alloc-util.h"
 #include "dhcp-internal.h"
 #include "dhcp-server-internal.h"
 #include "fd-util.h"
index 559c5e4df4d232cc88ae8345f17cc560f3a1df61..e29de60d2489dba8fe9442d113cfcf599951dde0 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-dhcp6-client.h"
 
+#include "alloc-util.h"
 #include "dhcp-identifier.h"
 #include "dhcp6-internal.h"
 #include "dhcp6-lease-internal.h"
index f34af6eabaa56f68dd7fcea59bdb21791249697a..3f32ba35e7f300ed68ee2042f4e4f40b92ba35be 100644 (file)
 
 #include <errno.h>
 
-#include "strv.h"
-#include "util.h"
-
+#include "alloc-util.h"
 #include "dhcp6-lease-internal.h"
 #include "dhcp6-protocol.h"
+#include "strv.h"
+#include "util.h"
 
 int dhcp6_lease_clear_timers(DHCP6IA *ia) {
         assert_return(ia, -EINVAL);
index 3053724ea2643601f587e4d76450af69a62a3ca0..5340fdc0c1f70317c60ea5ed577233dd345362c5 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-ipv4acd.h"
 
+#include "alloc-util.h"
 #include "arp-util.h"
 #include "event-util.h"
 #include "fd-util.h"
index 68ec58da901a274cc925efb61fcc79f4e4e316d4..0d915e20e7fd8d6483031420979c6014d9ec9323 100644 (file)
@@ -27,6 +27,7 @@
 #include "sd-ipv4acd.h"
 #include "sd-ipv4ll.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "in-addr-util.h"
 #include "list.h"
index bc06f483864e5a811e04ce0f576503f4d102cdf9..4ebe8053fa2e61cd0254757e289a3cf2966df847 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-lldp.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "hashmap.h"
index ca4bb6325b481816f5d05ece166d1e7102021fde..c494b9d6d8e5ade0e18ee84be67bbaa3f8f4e83a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-ndisc.h"
 
+#include "alloc-util.h"
 #include "async.h"
 #include "icmp6-util.h"
 #include "list.h"
index 03a88973bf148afb59ebfeecdeed5adca3d11724..045decc46c592a5f79f40b7416d2d1533c679fa9 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-pppoe.h"
 
+#include "alloc-util.h"
 #include "async.h"
 #include "event-util.h"
 #include "fd-util.h"
index 40a85eb25ef76314f54d406bc4199a93c4bed2f6..5b52c1cbb9bb6b0b57c64a2d3eefa3444a3b6dd4 100644 (file)
@@ -27,6 +27,7 @@
 #include "sd-dhcp-client.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "dhcp-identifier.h"
 #include "dhcp-internal.h"
 #include "dhcp-protocol.h"
index b1ef1748490732865efc4a457534ad0f37bab630..2d29e28f16885219399717fefbd3cf1d3dff4291 100644 (file)
@@ -5,11 +5,11 @@
 #include <errno.h>
 #include <string.h>
 
-#include "util.h"
-#include "macro.h"
-
-#include "dhcp-protocol.h"
+#include "alloc-util.h"
 #include "dhcp-internal.h"
+#include "dhcp-protocol.h"
+#include "macro.h"
+#include "util.h"
 
 struct option_desc {
         uint8_t sname[64];
index 9485a7df64a4c0895dff157cee07d9ca86c8a0be..913a929069980f833c0beeda3b70aa590132dca3 100644 (file)
@@ -29,6 +29,7 @@
 #include "sd-ipv4ll.h"
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "in-addr-util.h"
 #include "netlink-util.h"
index 109462662fc12b9ac1b118d9a6d85776c0ff24aa..931df7c170b4c57e568e3d8ebf7930666ee9798a 100644 (file)
@@ -28,6 +28,7 @@
 #include "sd-event.h"
 #include "sd-lldp.h"
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "fd-util.h"
 #include "lldp-network.h"
index 5951db483dff3c025654e762c387145f8279eaa0..d5bc32e757ad32dc17fd5017d8cb04d19a3ba71d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-bloom.h"
 #include "bus-control.h"
 #include "bus-internal.h"
index 7c99904c642278dcbe92c2ef7959ed90c5d2953f..2922da3763e63d3f7047e8affdbce0ea08b869ea 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/capability.h>
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "bus-creds.h"
 #include "bus-label.h"
index ab4e9cbc06fc7e1dc7035b7e933fb7361ffb8b8e..43a7e67a6d542e64bb9eb1c73191bbdac3c9b933 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-internal.h"
 #include "bus-message.h"
index 831ceb86b9f26abb3107c110f3235f9404df5497..84229c296407982fd4166bf77f55364cf7cfec36 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "errno-list.h"
 #include "string-util.h"
 #include "util.h"
index 8cab1bf2193fe2b5665a17d6bf58ddbabe2bc67d..d9f9cd1c5e24e14a9a8bdfd400fcbcf14b630612 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-message.h"
 #include "hexdecoct.h"
index a32b0ef2218533c1008fab2c6eac81bb2fc7dcd8..6716f6daca8967745fcdc599daf6062ef9ed20bc 100644 (file)
@@ -34,6 +34,7 @@
 #include <libgen.h>
 #undef basename
 
+#include "alloc-util.h"
 #include "bus-bloom.h"
 #include "bus-internal.h"
 #include "bus-kernel.h"
index 6a37f22c1f7dd34b57bd031c612ab075fd1b68ab..55dc7caa53012c2870a0ea852bfa4c36f01ba1d3 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-match.h"
 #include "bus-message.h"
index d5a6ad581fe56a60be9330632c83f3834e24df6c..5c80095bf09b222c5a2d72b0deb2cb0e9db1518b 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-gvariant.h"
 #include "bus-internal.h"
 #include "bus-message.h"
index d3679800b5f70d036f32b753076445e7b92eb257..8c472626a869eef9cad306e3df7f5d5241a3fcd9 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-introspect.h"
 #include "bus-message.h"
index 63f10eba2c9e52c072038ed6a0fb606a51abc490..550bad27ba689e36f42efce34056c43181498a2e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-control.h"
 #include "bus-objects.h"
 #include "string-util.h"
index 2c46d84cd08ac77d73a1a63dde5b6921ada99700..a5cb667630a531fb5ec3cdbcc851fba6f1e934dc 100644 (file)
@@ -27,6 +27,7 @@
 #include "sd-bus.h"
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-message.h"
 #include "bus-socket.h"
index 0911156e195eb2c1cd3f53f5aab1ea21cff87d54..fd7e58fcfacb0b15bb58a36ad5d1fbec28cbdbd5 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-track.h"
 #include "bus-util.h"
index 5604db971616e378f95ce3c7c7b3c195e0bc945a..71f962b00cd7ecfcce7947cef59f46b48eb0ff27 100644 (file)
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
+#include "busctl-introspect.h"
 #include "string-util.h"
 #include "util.h"
 #include "xml.h"
-#include "busctl-introspect.h"
 
 #define NODE_DEPTH_MAX 16
 
index 4fa60bb18599488a3d13d08ed4356171a06da388..452ac7c407ece57bac3f3e6f622bd708e11c307f 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-internal.h"
 #include "bus-signature.h"
index 0d92a0d461a53b9bbeddf3e95487fc4566ca8b87..a8d79b01b0428eb58ba88ae3dd0d88f216692379 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-container.h"
 #include "bus-control.h"
 #include "bus-internal.h"
index 549c88cd2d69b4f3d3e92f56d89adad74c6f4a64..96a0929a14ca7494a0bffbffc74de6f46ac649cc 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-kernel.h"
 #include "bus-util.h"
index e9e5e4a8e354989f0a8b69c730dc4ed083de89e8..767aef63ffe0755c81caa70f2fe459d8847e399a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-internal.h"
 #include "bus-match.h"
index f94da4cccd7340c49304338adba1499cbf765d2f..931c001788d3e0ecf4e641c062a15709205b1591 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-gvariant.h"
 #include "bus-internal.h"
index ff7f9cdafa1da39e9cd00914d69e9a74688b107b..dbdaa69fbe782e63923bbb8633d5a40056cad5ab 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-kernel.h"
 #include "bus-util.h"
 #include "fd-util.h"
index 7d05953cd0d695df68ace4d8f431a8053af3bf45..0080f71d3bf34519e2526a6617047debc0d6a6f0 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-kernel.h"
 #include "bus-util.h"
index 7da1dacd8120f3ab30d3d6855a2b41103676ca0c..0747d6a37cb1a4fdedfd5a2bbe5650f93e00da78 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-label.h"
 #include "bus-message.h"
index 138db910ea4188f39d99d1e056660d7eb19b6b83..5bc72e2355d6269cf418d952801f0de2173b32ad 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-internal.h"
 #include "bus-message.h"
index ae04ff5b0d11c9758fc77526dc55f57638f8f98c..428e18576946ed85e04e12da323f33d030e80ce8 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-kernel.h"
 #include "bus-util.h"
index 1be0dbcd82768f6c34e0b7bd148282249e58b4fd..ff8df61a9e6cb2c98fd64ec5181414903a713a22 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-dump.h"
 #include "bus-kernel.h"
 #include "bus-message.h"
index 49fac7bdccf13ab75319db93cf0a9cd587cd5acd..77b5dd52f6ee8c03871f1a9b56e317e3d4b9ab63 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "parse-util.h"
index e1eb5b26b3a755d953f424f537a1232133952165..ae3157ee5ee30856c774ac53dd50a9c59a81e9a4 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "device-enumerator-private.h"
 #include "device-util.h"
 #include "dirent-util.h"
index 69288b833e00491e17f4a8e3ead3a064c6b14c46..a13477e75330afed4150a0ed67ca9d8ae5e82633 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "device-internal.h"
 #include "device-private.h"
 #include "device-util.h"
index 3b964de56bca4bb4701743f71513bf7e2f9a6733..0d40bc5c00624b33e75367e1eb09b9461c86163c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "device-internal.h"
 #include "device-private.h"
 #include "device-util.h"
index b3f888171493e4f06585f01048561401709d3699..ee4886700e3cb304d2badb712e73ab7c76edc7cf 100644 (file)
@@ -27,6 +27,7 @@
 #include "sd-event.h"
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hashmap.h"
 #include "list.h"
index 9304fd376ef78dcc4e4f4a2d8492b9f53f480d11..0e034863d6c667bbf6997b5e4ae4f92df78c70db 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "sd-hwdb.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hashmap.h"
 #include "hwdb-internal.h"
index 6b98a7c17856ee6873c8309ea534bccfee9a4dcb..cd766c3f91edea17c62e07c9bfde52151c6d29db 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-login.h"
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "dirent-util.h"
 #include "escape.h"
index 46aa73b38ab28a3c7624fa1581b4226208bd64c3..b0f94c9522ec379de9fdc287fae6d520683f12dd 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-login.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "string-util.h"
index e2f637f7f9c93c58a53a2fc258b6ad62a8213055..a00865b56bd4cdadbf654ac5b985ee92caffddea 100644 (file)
@@ -21,6 +21,8 @@
 ***/
 
 #include "sd-netlink.h"
+
+#include "alloc-util.h"
 #include "netlink-util.h"
 #include "macro.h"
 #include "local-addresses.h"
index 80ad70cfeeec8cc19aa71c560a2ea5e75c4359a5..03971b35963cfe04ae667c4b2aeac33fda7709ec 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "formats-util.h"
 #include "missing.h"
 #include "netlink-internal.h"
index 68a4d3c0d1ca62b33bf9933f11e612e67119b4f3..13945202e40a93565209405e68341d7b1a5b04d1 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "formats-util.h"
 #include "missing.h"
 #include "netlink-internal.h"
index ba1f2a5a4252f01596142485dbf74d238b54911d..7c24e053cfb5bf1a6718f0d0b9f6cc8ad7f1830a 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hashmap.h"
 #include "macro.h"
index 9867eec0653bbc4792eff77335df3b1a97921731..71801759700a91ed49a3d7f84bc89dd97a8f8c6d 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "in-addr-util.h"
 #include "local-addresses.h"
 #include "af-list.h"
index 8070ff07c419012feef8e8ab36d7b190419a2f7f..a2d6c5931470d0446108bfb1fbb9239be2e69a1a 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "network-util.h"
 #include "strv.h"
index 6cc3321f429ba7442878caeaf3f354eb1f1b1d88..2eaa2626f770d05addd550c7893873a6cebaa4cf 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-network.h"
 
+#include "alloc-util.h"
 #include "fileio.h"
 #include "macro.h"
 #include "string-util.h"
index c1d42e96e5733a50cc0e72f2c3ee272cf098718e..480f1ad065e3e2d8493f10a1531c641db60abd36 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "sd-path.h"
 
+#include "alloc-util.h"
 #include "architecture.h"
 #include "fd-util.h"
 #include "fileio.h"
index 724405d534febac25f0fed284327e71977f78ee4..48767600c909d21a67dee605d1d22b665c3ae45b 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "sd-resolve.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "list.h"
index 87e6e4704181d397ad479830559440be8b83b778..05544a584c75d22d0d4f5a22fb68569b711e8d17 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-resolve.h"
 
+#include "alloc-util.h"
 #include "macro.h"
 #include "resolve-util.h"
 #include "socket-util.h"
index bd349e3f6400e0ef2180d09cde3946b53fc981e7..814e016800cff82f7a373fe2c5f826b55be6b2b5 100644 (file)
@@ -37,6 +37,7 @@
 #include "libudev.h"
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "device-private.h"
 #include "device-util.h"
 #include "libudev-device-internal.h"
index 56436772b07de724b722ed99caf97fe265506516..442f9615f2d4310a4eabc5b612d9926e256ebad3 100644 (file)
@@ -31,6 +31,7 @@
 #include "libudev.h"
 #include "sd-device.h"
 
+#include "alloc-util.h"
 #include "device-enumerator-private.h"
 #include "device-util.h"
 #include "libudev-device-internal.h"
index 6dc2b0533ee16a6ab237c66d8d3d52211e985465..eba698d163e57689f956f5526e0d62de97dab7fb 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "sd-hwdb.h"
 
+#include "alloc-util.h"
 #include "hwdb-util.h"
 #include "libudev-private.h"
 
index 19e9130be0b630ac6445e584a66289c5b50cea3b..da496ed4563aa10c63d021cf9f0f2571e1aba5d6 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdlib.h>
-#include <stddef.h>
 #include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "libudev-private.h"
 
 /**
index 0059c09e77bb2bedab608d7646900d45898aafcc..fedaea6118c6aed4f6475d3b9f245fc664a1d954 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index a22994c8a249835829775e38b9b99226cd77657c..58410b1b8fea79f5873cf26ae96bcf47890b4cc1 100644 (file)
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <sys/inotify.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "libudev-private.h"
index afadfe6993825b5f035e5c7ce3f983971f667641..63fb05547dee4e1c59ce30749ea7574968fb2fd8 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "libudev-private.h"
 #include "missing.h"
index 1f25d232d20121383ef9e11a3399920c823c3998..720cbbaaba0121b6be453cdf8edd644bad6e4baf 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-message.h"
 #include "bus-util.h"
index f79f89af7edf9aa1c3d358a4d75086d8566c3cca..70fef332f7e4de99ab0d355b652661037b55a592 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "fd-util.h"
index 92443c819098846242b4221719c1893628a787e9..aff68a49fe976655a84344b47b61ac365f0fa3e0 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-show.h"
index acb2bd57653beac7493328387ed97a35be4eddcb..d0dd569a03cf96490a8639f968b983d2cb923f65 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 
 #include "acl-util.h"
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "escape.h"
 #include "fd-util.h"
index 8c452456a04946b4f151f8a0d4ebd79d0c403990..185108f8f1d34972cf3d6da0f5cf87f96d3e2b64 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "conf-parser.h"
index b98035be2116ce79569fc93eb4dff5b35a703941..b08b69dbfc39c0350b4db9e3a94eb0c05ed18ded 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "logind-button.h"
 #include "string-util.h"
index c2541e490ba50c86012769f3394ad29ab8bce4a9..b3f30c8dc9369b61a820e06bfed7606a5d789989 100644 (file)
@@ -25,6 +25,7 @@
 #include <pwd.h>
 #include <linux/vt.h>
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
index 4204732e7d933f33a90bc39c47239d6a800fc1e2..7890d68aa0f6227c6c0cdfd6e04c68a6e16772d7 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
index ee4c45fb8dd9125d76d0bc0d366981a67c31f5c4..ffb9162e56c435f7a7add489d410b9e96c94a555 100644 (file)
@@ -21,8 +21,9 @@
 
 #include <string.h>
 
-#include "util.h"
+#include "alloc-util.h"
 #include "logind-device.h"
+#include "util.h"
 
 Device* device_new(Manager *m, const char *sysfs, bool master) {
         Device *d;
index 92b580709410e19d9960241f536705db699ca5b1..33fbdde557c92ae5d4f6a10b0eae0846c7454c3b 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
index 66626b5871dc90af14b6f1a443a16919cb24858d..43b578f364d447b11ecf0a445fa9ac3bb7091e12 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-label.h"
 #include "bus-util.h"
index 2dcf8ddc62bae32c152b20c69a35484cecfaae5a..1f4936cebe4f8a77bf11aa53c4c41e83e5905338 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index fe398a5eb68194d3b7402a5bd621e80014ebf381..7810199a542e566b12dcd63339953e1ea23c1019 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-label.h"
 #include "bus-util.h"
index 3a0bb720f909e8ba0f9c8ae27706714f4f692474..9bf3ca0995530eca91c25aedcf911416f31fe8a1 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "fd-util.h"
 #include "logind-session-device.h"
index 26c135b2ca6b1e5a6f890f337ab60d94a20d0256..a53dcb9960e44cd675543fb41f32f5821bff9872 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
index 5975b579e96c45ead89b8829074de2d534b85e5d..df901f6558101111fb8ed65c02cee4242160f5a1 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "formats-util.h"
 #include "logind-user.h"
index 1cf9be7441968650ddb4c69bb91cb4c34e407e9e..56bc5a010c6710bbdeef7da18a705a7df6902965 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/mount.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "clean-ipc.h"
index 3f4a629be35c88d39cd1333ab415a74a05921be2..3e7a935a34a42d04343bdeab8bb439563e8d98eb 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
index 957ea1fd7eddd77abf1c8ed9d8402b5138f99df2..4b8c834269a1ce26550a223e002ff9cc9292f024 100644 (file)
@@ -27,6 +27,7 @@
 #include "libudev.h"
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "conf-parser.h"
index c37cfdb68b02dd870c94f53c616d30eb8eb19662..0d61f528db360cabe368901ce8d46a08b21a23d7 100644 (file)
@@ -30,6 +30,7 @@
 #include <security/pam_modutil.h>
 #include <sys/file.h>
 
+#include "alloc-util.h"
 #include "audit-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
index 0f671ac90ebcf7be63fb6e0ef0a551e4e27b8590..e9ca4bb03d0d15cdb0c02a14eeeffedd6d1087af 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "libudev.h"
 
+#include "alloc-util.h"
 #include "locale-util.h"
 #include "path-util.h"
 #include "string-util.h"
index a287b9697a7d5c39f5af6a9d1c8b16ae7c58d1b9..4ec1766033906ba4b6be102ad1bd5cdc7c5ac88c 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-label.h"
 #include "bus-util.h"
 #include "image-dbus.h"
index 1132d758237e0ba1a9ed7a481a73cc309a98ef1f..452130a29cf362015874d241ccbf4d7ee81d02cf 100644 (file)
@@ -29,6 +29,7 @@
 #include <libgen.h>
 #undef basename
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-internal.h"
 #include "bus-label.h"
index 2889cb320542e0fc4bb834aa4ff176ec984f510f..fa6b70f788cb46c135ad9777b244b1783be7723c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "escape.h"
index b8b9e0f51911c2b6ba0cf43abd75c060d4f451e9..7e17c7a41c15a7d6fcb6373486784d7e91e4376a 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-show.h"
index 182dedda897943c25ffe6cc9c69153a4c08985ca..7827f063c1911b9095b0927cd45d3181a2e75c5d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "bus-common-errors.h"
 #include "bus-util.h"
index 1a61da041d2466879383141a02b9cf3856adf29e..d6e7ce67fc8ab2d4eb934b1799ebdd8d6aa5f5e8 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "cgroup-util.h"
index d0d7669c8739f17718bb0aa7c4d240eb382cafee..97c1fe65602c3682ef316f237cf82a8d286c2118 100644 (file)
@@ -28,6 +28,7 @@
 #include "sd-netlink.h"
 #include "sd-network.h"
 
+#include "alloc-util.h"
 #include "arphrd-list.h"
 #include "device-util.h"
 #include "ether-addr-util.h"
index 08e0b9a64b64d47ef16f0b5120e4f7d74827b319..889fe1e30d3a724c104624557758be0d4eac645b 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "networkd-address-pool.h"
 #include "networkd.h"
 #include "set.h"
index 1beb7ffae4808b9a55c258f84dd909082cf6b31f..e550ee5701de348d07e8136e54e2668a289cb51f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <net/if.h>
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "firewall-util.h"
 #include "netlink-util.h"
index 22594a9415505a950a92413970f41c904c5fe7cb..c412a2cc3156e248977a84d726b7684df315f055 100644 (file)
 #include <netinet/ether.h>
 #include <linux/if.h>
 
+#include "alloc-util.h"
+#include "dhcp-lease-internal.h"
 #include "hostname-util.h"
-#include "networkd-link.h"
 #include "network-internal.h"
-#include "dhcp-lease-internal.h"
+#include "networkd-link.h"
 
 static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m,
                                void *userdata) {
index 9cb63cb79f4cf3eb1aaad33f2e26195c80bf1088..c9222b8cb8ec5f936fe87acab1bc0f8503e77ca3 100644 (file)
 #include <net/if.h>
 #include <net/ethernet.h>
 
+#include "alloc-util.h"
 #include "conf-parser.h"
-#include "util.h"
 #include "netlink-util.h"
-
-#include "networkd.h"
 #include "networkd-fdb.h"
+#include "networkd.h"
+#include "util.h"
 
 /* create a new FDB entry or get an existing one. */
 int fdb_entry_new_static(Network *const network,
index f40a01fd78e2e098483fd76443d24b3a0350fffd..7fc4510ac90674e60877ae194b4c5de0acfb498f 100644 (file)
@@ -22,6 +22,7 @@
 #include "bus-util.h"
 #include "strv.h"
 
+#include "alloc-util.h"
 #include "networkd-link.h"
 #include "networkd.h"
 #include "parse-util.h"
index ab37c43dcb4e0bd213a580a5ef45247a1b00a9b4..dcc2569660c6482510b192b16d5c990c7b38b2d3 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/if.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "dhcp-lease-internal.h"
 #include "fd-util.h"
index b281f4fdb6c693eed704117dae86f2ab5a17fc6f..dafaf2daea61d062b7a2b56f124653744a1cadba 100644 (file)
@@ -19,8 +19,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-util.h"
-
 #include "networkd.h"
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
index af243c9a708ff806a237cf452d3051c39341de0f..6b2a661ca7f43ffdc385ce7f9b90e79bf6f58791 100644 (file)
@@ -25,6 +25,7 @@
 #include "sd-daemon.h"
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "bus-util.h"
 #include "conf-parser.h"
 #include "def.h"
index ce9c18d654899fd94665098931bf44fcff09d79b..70105b8aa0c16a3ba38d45c3ee26d827f1a6abed 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "missing.h"
 #include "networkd-netdev-bond.h"
index d04bb9bd9f8344c0b333976201abdbb5429fc0b8..851e83537e7cf66964ebe0a78f81f5898089c95e 100644 (file)
@@ -23,6 +23,7 @@
 #include <net/if.h>
 #include <linux/if_tun.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "networkd-netdev-tuntap.h"
 #include "user-util.h"
index 5060888a2f7e0a33042fba53a036f9c7e16634e2..dd0b400c6a0a8cb1337837e9b7cd4bc7c6582c33 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <net/if.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "fd-util.h"
index 2199b93baae96dd2d9c0e60720f308ae12d05129..120760a986d3ef696be1f0494a3e07cea1fae484 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "networkd.h"
 #include "string-util.h"
 #include "strv.h"
index c8c6f5df1172d77527bde37d754d43a4b4311536..cc8d019017c6e3c1231439a440431c5635fb37df 100644 (file)
@@ -22,6 +22,7 @@
 #include <ctype.h>
 #include <net/if.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "dns-domain.h"
index 7ae6ca26005a704e2123f6a5f3d70b08a6d01228..4a74bc69f3a3083973973ce8e0ff5e2d0d2a3725 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "in-addr-util.h"
 #include "netlink-util.h"
index cc4b46d5b07a190e03a44aab8abbe87caf0a0630..c2779ff773e42c5757b3a6cc374647ca572685fe 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "sd-network.h"
 
+#include "alloc-util.h"
 #include "networkd-wait-online-link.h"
 #include "string-util.h"
 
index 112d92a568a74f4b2449dceec4bb61ac35068870..0c40ab2bb8ae3fda778da480fd45a293e29b0141 100644 (file)
 #include <linux/if.h>
 #include <fnmatch.h>
 
+#include "alloc-util.h"
 #include "netlink-util.h"
-
 #include "network-internal.h"
 #include "networkd-wait-online-link.h"
 #include "networkd-wait-online.h"
-
-#include "util.h"
 #include "time-util.h"
+#include "util.h"
 
 bool manager_ignore_link(Manager *m, Link *link) {
         char **ignore;
index bac1d6781ddb83bc73ecb9c9482dfe4cec840e53..dbed3795e3ffca16cf57243d808eae1fe6abee90 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "networkd.h"
 #include "network-internal.h"
 #include "dhcp-lease-internal.h"
index 77f017dbac6624d2decd3c8bae128f21d335deef..b1445547023a027b811162d9e0c3922ef4b836e0 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "env-util.h"
 #include "formats-util.h"
 #include "log.h"
index 4e86ed13cba1979435f3019105c00c1aee563d35..270bcf010fcfa46be24af468a1791818188b3af8 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/mount.h>
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index 89c8240399209247871727d4e40f2e5e7aec2062..38245434da8bd202451cae65573a691d119596d6 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "firewall-util.h"
 #include "in-addr-util.h"
index 81003dff89ac5e571767dfecc65488f94a591003..ee61306aa55227e4840ce9c9a6e56d7d7eb29547 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/mount.h>
 #include <linux/magic.h>
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "escape.h"
 #include "fs-util.h"
index 4af18a4e94e2bbf762392a2ad729e18a09a0748c..29384b60b222571354fa03518b5dcd94447a7b69 100644 (file)
@@ -26,6 +26,7 @@
 #include "sd-id128.h"
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "ether-addr-util.h"
 #include "netlink-util.h"
 #include "siphash24.h"
index f0888847761728d0a4272e3dc501c9fe8819f388..ee9e70acec81d5de795f15423fb1277738e29d43 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "util.h"
 #include "conf-parser.h"
 #include "strv.h"
index 6b4ca5a3f30f2969e0fa8fa070e44b2ca801054f..aa6a16309c988d416c7610c9678dc09a114ac7af 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "mkdir.h"
 #include "nspawn-setuid.h"
index 1ce219b84463cfcb9d174ff5cf32b3990a3589cb..8140cda1414917fadde5cf774b5476c61b728472 100644 (file)
@@ -46,6 +46,7 @@
 #include "sd-daemon.h"
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "barrier.h"
 #include "base-filesystem.h"
 #include "blkid-util.h"
index 009a9ad886e70f858f8bf3479004a4c1877c9bd0..ee10b105eab86f364d61e5020fab788232b9e660 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "hostname-util.h"
 #include "local-addresses.h"
 #include "macro.h"
index b98bde676b931a1290153141958fcb62b7897911..969fa9619e17454070a4ed6335eeef38f8dc85ac 100644 (file)
@@ -25,6 +25,7 @@
 #include "sd-bus.h"
 #include "sd-login.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-util.h"
 #include "hostname-util.h"
index 97e8323de13f0a9c1e7667febc69d8cea9089307..0ece72f6fe23b3ea9097397446addbe53b0cf84e 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-path.h"
 
+#include "alloc-util.h"
 #include "log.h"
 #include "macro.h"
 #include "string-util.h"
index fbfd3a3eba78a4e5594f687685d3615ce087b77f..d857ade36a0a4cdf579ac09bd544f20fb6a11810 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "log.h"
index 1007de395948acc47a6471834b78ce3e962aeceb..8e5cf0908c14270a4000abd626fad105d75ffe29 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "log.h"
 #include "mkdir.h"
 #include "string-util.h"
index 9b808ff110fa17a413b1679c9ae0e281e778d1fb..57739d1f3e7ccaada76b141d2aae7c97b19af43a 100644 (file)
@@ -25,6 +25,7 @@
 #include "sd-bus.h"
 
 #include "af-list.h"
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "in-addr-util.h"
index bf1b7c8ab449b965f5eea69ab07775682cca0d4d..f0a3b607d4a85d7716e7a088b4f31bcde7098059 100644 (file)
@@ -19,9 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-util.h"
-
 #include "dns-domain.h"
 #include "resolved-bus.h"
 #include "resolved-def.h"
index 17eafec2fa65d7d7895e2af09e3bdacfdb903559..c9919ced670998a8c79a0ce7401f991313f3728c 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
  ***/
 
+#include "alloc-util.h"
 #include "conf-parser.h"
+#include "extract-word.h"
 #include "parse-util.h"
 #include "resolved-conf.h"
-#include "extract-word.h"
 #include "string-util.h"
 
 int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string) {
@@ -35,7 +36,7 @@ int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string)
         first = type == DNS_SERVER_FALLBACK ? m->fallback_dns_servers : m->dns_servers;
 
         for(;;) {
-                _cleanup_free_ char *word;
+                _cleanup_free_ char *word = NULL;
                 union in_addr_union addr;
                 bool found = false;
                 DnsServer *s;
@@ -44,7 +45,6 @@ int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string)
                 r = extract_first_word(&string, &word, NULL, 0);
                 if (r < 0)
                         return log_error_errno(r, "Failed to parse resolved dns server syntax \"%s\": %m", string);
-
                 if (r == 0)
                         break;
 
index e1a2865007a15c44ab9c3e00f4b80bca094e36ee..3cf9c6807477f815e6929ef6854d4291bee51413 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "resolved-dns-answer.h"
 #include "string-util.h"
index ab13636bc182d3bb99ff2b3e038c7042932af08d..04f64022e01c4444e404e8f6e6f9c598afff04a5 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "resolved-dns-cache.h"
 #include "resolved-dns-packet.h"
 
index f7f936d3435581d5ee094c8fef19193540421c8f..f23b3cf89340d120119ed20c53900250611e66e6 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
  ***/
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "resolved-dns-packet.h"
 #include "string-table.h"
index 4b1d18b2ef1ef4158d552ce80bed2a2cd11bde8c..f7cb84e2a62fed26af548d5b06f2d41ad7405c32 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "hostname-util.h"
+#include "alloc-util.h"
 #include "dns-domain.h"
+#include "hostname-util.h"
 #include "local-addresses.h"
-
 #include "resolved-dns-query.h"
 
 /* How long to wait for the query in total */
index 1507f22da0998cfdd05b7cc9e82ead6c505507c5..48951221dc9ccbd090c3573d469aa40e9888968a 100644 (file)
@@ -19,8 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "resolved-dns-question.h"
+#include "alloc-util.h"
 #include "dns-domain.h"
+#include "resolved-dns-question.h"
 
 DnsQuestion *dns_question_new(unsigned n) {
         DnsQuestion *q;
index 63edee1fd177260ea56e3a8af761aa8e9c3a9afc..ba2ea686f33ec13d75841f624590fbde71d1ca7e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <math.h>
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "dns-type.h"
 #include "hexdecoct.h"
index 7c63c63b63c9b8aa17e5ad5d690ce5ca5ccf1d8a..b15370b017b8e9d5c06c74ddbf369608364c7233 100644 (file)
@@ -22,6 +22,7 @@
 #include <netinet/tcp.h>
 
 #include "af-list.h"
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "fd-util.h"
 #include "hostname-util.h"
index 8693911e65440180ccd1aedababa4c0937137bde..e803f635abda8835e93e0eba1638ac4383fc9756 100644 (file)
@@ -19,9 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "siphash24.h"
-
+#include "alloc-util.h"
 #include "resolved-dns-server.h"
+#include "siphash24.h"
 
 /* After how much time to repeat classic DNS requests */
 #define DNS_TIMEOUT_MIN_USEC (500 * USEC_PER_MSEC)
index 1150c3067780d101152d400881586342573421f5..1c501182fb77e5bba2321d23295e12a5093d6afb 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <netinet/tcp.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "missing.h"
index c60197cf8db58089e449113ba7d87c0098534b6d..6545f6cd8a7ed39a37b9fd4d945e2257f1b608c9 100644 (file)
@@ -20,6 +20,7 @@
 ***/
 
 #include "af-list.h"
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "fd-util.h"
 #include "random-util.h"
index 8a6086a4de88789528bff0404837346ee9171218..48dcf76daac9bf40e252c2c56516467176ad3aea 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "list.h"
 #include "resolved-dns-packet.h"
index 8c88e2dbf11a2f44a94304b9200c4227b97073f6..28926410753ffae5925bd94e7731808cab5ef640 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "sd-network.h"
 
+#include "alloc-util.h"
 #include "missing.h"
 #include "parse-util.h"
 #include "resolved-link.h"
index b9c625b9cf27f63c2ec5f451e2c4e650262e5bd5..a588538b52afa2eb892804444ba4cbcd1b212531 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/ioctl.h>
 
 #include "af-list.h"
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "fd-util.h"
 #include "fileio-label.h"
index 5ba1e3d4a8c21b68c509d1cda519b951989aea8d..bb00f99ecf7b19b0d8968803ca8504636f3657ff 100644 (file)
@@ -25,6 +25,7 @@
 #include "libudev.h"
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
index dbcb29546f5a434ecf66d58b754bb8e0f0b3ef02..38a482bb117a23e6f3a0f59869907fccf76bde82 100644 (file)
@@ -25,6 +25,7 @@
 #include "sd-bus.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "calendarspec.h"
index e8931daee29e3ac43a47ad19cf1d5d335f25cefd..79f5a605796ad3688f4358fe65920b9c7c2677cf 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <stdbool.h>
 
+#include "alloc-util.h"
 #include "acl-util.h"
 #include "string-util.h"
 #include "strv.h"
index b3d2f96885540d7a15aad571333c04c4364b26d9..8e36067f7458af1d0becf3b277c42a58fbbeec18 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "acpi-fpdt.h"
 #include "fd-util.h"
 #include "fileio.h"
index 48d0f84995fabebd10acc7a8a7d9697672c1ed58..f6ac43adfe7756536b6da19532a8b473adaaff21 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "apparmor-util.h"
 #include "fileio.h"
 #include "parse-util.h"
index b2dbf98b8e6d6507bddbed588fb417f6aeb365bd..c96dbf877a672f4b265d0634658f0f0c1de30578 100644 (file)
@@ -32,6 +32,7 @@
 #include <termios.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "ask-password-api.h"
 #include "fd-util.h"
 #include "fileio.h"
index ff91c6bdc50fb4a2c95e1259c88171241a206c4c..e605490c3211c58c8ccafab1f09aff0317d9e6c6 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "base-filesystem.h"
 #include "fd-util.h"
 #include "log.h"
index 8f6278191ab09e32e6257f1217320d76133ac143..f4a918063d2e69199cda758c28af1b30a4dfa865 100644 (file)
@@ -25,6 +25,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-internal.h"
 #include "bus-label.h"
index 9e70713ce8db36ef90a9f32269f657bbd3582267..129ffc7056bebbd62be6829d5f3f6b8294900053 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "cgroup-show.h"
 #include "cgroup-util.h"
 #include "fd-util.h"
index 2929e3e821048bb97fd4a905f782f8eb8af41e64..a69719116c9907e06f8fa5b3845c0a4147090bad 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "apparmor-util.h"
 #include "architecture.h"
 #include "audit-util.h"
index fa13eb80758f6ee20e6220adb7538f97967ce766..163a83518ba0b1c4236aa0800047726f1daddc1d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "fd-util.h"
index 0d321af9671083d8ef3a3e9a60c014e795c634fe..ad3c17d5bd108262fef6fad863a030086d90dc22 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "dev-setup.h"
 #include "label.h"
 #include "path-util.h"
index b6587306a58f130a8728682370939197c6c06232..7af15e00984e077f3a27cb35912b98749f2973ea 100644 (file)
@@ -24,6 +24,7 @@
 #include <stringprep.h>
 #endif
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "hexdecoct.h"
 #include "parse-util.h"
index 25400277ff98580dcd268861b84c5fc1a9ed973b..0d44401cc2ed914fd5ad976ea62a0642b9fae0ea 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "dropin.h"
 #include "escape.h"
index e7972d1574c13c919971691e7e2748ec291447e9..86bb0b57c3d61227be98e3361783c4703bcc5ada 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <fcntl.h>
 
+#include "alloc-util.h"
 #include "dirent-util.h"
 #include "efivars.h"
 #include "fd-util.h"
index effc6e8e703b2451a1937a89eaf48cd39a647056..e1782878726cc95a54b54d4962f91294919e468a 100644 (file)
@@ -27,8 +27,9 @@
 #include <linux/netfilter/xt_addrtype.h>
 #include <libiptc/libiptc.h>
 
-#include "util.h"
+#include "alloc-util.h"
 #include "firewall-util.h"
+#include "util.h"
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free);
 
index 1ea11ea5a45810de6902c626b77a38b49b9a40fa..eb2845cddf4f8b4eb23b9db080ad97434853b1e9 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "device-nodes.h"
 #include "fstab-util.h"
 #include "mount-util.h"
index 203e01318bd29a04d8923eb21bb9eeb586456783..cb4ebc606e676ce2603899dbe5d2ea6e874d4a79 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "dropin.h"
 #include "escape.h"
 #include "fd-util.h"
index bf5395dee8866fab1233cef81b79e1392353278d..ddc8c00a2d5644930bd71c919f03fd74ee42a223 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "import-util.h"
 #include "path-util.h"
index 224874f65cc25af34a05fa47b255af8b7edd8501..e1cb5d27ffa7d9b5fb03d8dda45e6b946900ed31 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdlib.h>
 
+#include "alloc-util.h"
 #include "formats-util.h"
 #include "install-printf.h"
 #include "specifier.h"
index 1f63ae9ce0e6866ba5049b6aa05c35b74c86835a..c74efede76e4860c80f87c4a4c206560288fd836 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "dirent-util.h"
index 5b4a220e5fb75a7dd918a3a0174eae0e64f4f299..0313b0946f38f455dbf90352797ca4c9c76bc3e5 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/socket.h>
 #include <time.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "hashmap.h"
index a4e77fb8d89499b48bf7209970396ea433e8ed22..2c1da0a40d51ccc0cef05709633b009afb98244e 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/fs.h>
 #include <sys/statfs.h>
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "chattr-util.h"
 #include "copy.h"
index 1c7e0ef2c10433dac4923463b419408bf7b5a8be..60b1b3092d73d2680c3a03b560aeae02a0223a69 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/statvfs.h>
 #include <sys/vfs.h>
 
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index 1e63c7204745dad8adae5210b85a64e265bc3741..d71f379e76732b4a74d208b3ccfe15a7c8baf38e 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <errno.h>
 
+#include "alloc-util.h"
 #include "util.h"
 #include "strv.h"
 #include "path-util.h"
index e5e0f37adf11dcec7d708fb2ebf41ef5c939b759..786752ea941b4d38ef8d09dff2eaa54f60870ced 100644 (file)
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <termios.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "ptyfwd.h"
 #include "util.h"
index 0e232e6aa6f20960fa0d3ac297d7c5ea7cbd22ed..bbbb3460d4a72e372c67f0f90b34101f77bbd486 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "fd-util.h"
 #include "fileio.h"
index 610aec0df5bdcdcfa889bd54d82ba70104c21af1..c5c4a4d7d7fad41bde406909cf40c86660aa1344 100644 (file)
 #include <string.h>
 #include <sys/utsname.h>
 
+#include "alloc-util.h"
 #include "hostname-util.h"
 #include "macro.h"
+#include "specifier.h"
 #include "string-util.h"
 #include "util.h"
-#include "specifier.h"
 
 /*
  * Generic infrastructure for replacing %x style specifiers in
index 1e6ac2f27dd83f11c359c416095158e10ef33e3e..13b32a0509b5b6ee33cddc1faae131e87022e993 100644 (file)
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #include <utmpx.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hostname-util.h"
 #include "macro.h"
index e82fb064171ab5f667b004cc1e0738ab3f5a7129..ba82adadb425601f039ed910dd5c3fd0e55723c7 100644 (file)
@@ -34,6 +34,7 @@
 #include "sd-event.h"
 #include "sd-resolve.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "log.h"
 #include "path-util.h"
index 2faa93ef8817860b910c7874aee4afa81432aebf..f5efa1a064f9d147e3551047be6650766a1746bd 100644 (file)
@@ -37,6 +37,7 @@
 #include "sd-daemon.h"
 #include "sd-login.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-message.h"
index 5d2cbe1225672865f2308432db969408d4d9a18a..36d310b4c4a8baad97b70af7ae6754d2781fb9f6 100644 (file)
@@ -26,6 +26,7 @@
 #include <shadow.h>
 #include <utmp.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "copy.h"
 #include "fileio-label.h"
index e4b02ca990cf27cce0cee291f522d8d59e803825..0a0b9269b3f91c59af82b9657eda50bb8203def2 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "hashmap.h"
 #include "hexdecoct.h"
index 12f366a34c8bd3441f82590188820b112efa3115..70819b0371c0043458a3e7c7d31c016a3fb9d10d 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <string.h>
 
+#include "alloc-util.h"
 #include "calendarspec.h"
 #include "string-util.h"
 #include "util.h"
index f43f73795176e414aed218845ac6988dcd9a3768..4418bafda6e6aa95e70454e4683408fa561f6e85 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/prctl.h>
 
+#include "alloc-util.h"
 #include "cap-list.h"
 #include "capability-util.h"
 #include "fileio.h"
index e4f6d5168d8b1dc37aa61bf771a34d86c8022944..a48b324e2603070a7f74375c67d53fd352da1f83 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "dirent-util.h"
 #include "fd-util.h"
index 365f5794d434fb043a85a22c530c36eff4c60970..f224c6cdd8c11ab3cd19b39bb822748dbbe0f44e 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "apparmor-util.h"
 #include "architecture.h"
 #include "audit-util.h"
index f4b23355fc9b95e6bc25c7a0990844f646858de6..a69698d4ead1bbc5b4e8ff8e8c212a11dfab11f2 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "fs-util.h"
 #include "macro.h"
index 4ccf729e80b67ea566bc1c5c6077c4c8be13ee55..ad57cb0202f5cd4ae5d1cc0642708330368a96f2 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "copy.h"
 #include "fd-util.h"
 #include "fileio.h"
index e1c6ecb2ef927c79c75bbb017f300c45ce4c448d..c6d8bf82eaa8e0fc8b546e5605b1b693d2c0f8f1 100644 (file)
@@ -21,8 +21,9 @@
 
 #include <string.h>
 
-#include "util.h"
+#include "alloc-util.h"
 #include "string-util.h"
+#include "util.h"
 
 static void test_should_pass(const char *p) {
         usec_t t, q;
index 1c745d6e5b45a294fe6101096dd3863205aaf200..646b168cc0e3a10c2489fd0963039aa3321865a0 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/types.h>
 
+#include "alloc-util.h"
 #include "device-nodes.h"
 #include "string-util.h"
 #include "util.h"
index 1a8541e1cc1ba8f56cbbecf839aad32b7bff28eb..d5778748a05036722f3a8bb1a0197880d310adc4 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
  ***/
 
+#include "alloc-util.h"
 #include "dns-domain.h"
 #include "macro.h"
 #include "string-util.h"
index 033d5af7191f15b8edb84f0c62f6de6b4f386980..c597d5aecd25e215930fdc4511f1df79a10f513c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "def.h"
 #include "string-util.h"
 #include "terminal-util.h"
index 1c1fed4660b9a6e7f649df47dabf30c91259c1e2..e588681b86f0520fe765ec5e5902ef69c2d5b4c3 100644 (file)
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "ctype.h"
 #include "def.h"
 #include "env-util.h"
index b02f3a6e7c96b640408ba641e2afcbc634fd77c7..27816ac7796a5c6f54f0bc1cb24b8f942ef446bd 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "fstab-util.h"
 #include "log.h"
 #include "string-util.h"
index 2da64469617f4b876e59565466313e81ab371082..6bf33306a94ba48361034a89bb9542d3493e8b90 100644 (file)
@@ -17,6 +17,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "hashmap.h"
 #include "string-util.h"
 #include "strv.h"
index ac8f4ecc6868a73fca3d576ed2a2f614eb89392c..590175433c3c0e7ea4bd30f6456723c71cab3a48 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
+#include "alloc-util.h"
 #include "fileio.h"
 #include "hostname-util.h"
 #include "string-util.h"
+#include "util.h"
 
 static void test_hostname_is_valid(void) {
         assert_se(hostname_is_valid("foobar", false));
index 2c8ba70ffb8b169954db60fadc6d73d82bdcf3e6..32cf3f80ca6e73ae54cc98521623503b57a56c7e 100644 (file)
@@ -24,6 +24,7 @@
 #include "sd-daemon.h"
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "macro.h"
 #include "string-util.h"
 #include "util.h"
index ba4d75c0c8c30e4a0ce4e9592cd5bf127d44a84a..3995224eea888790fde0186820b92378abad803d 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <math.h>
 
+#include "alloc-util.h"
 #include "json.h"
 #include "string-util.h"
 #include "util.h"
index a060a7ba6f1dbed67f2c940cdbf1308a3855f3f3..5a12e959d4350b090403aba7654571b2b93e967a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/socket.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "namespace.h"
 #include "process-util.h"
index e2979a8710b779a62de3a23fc89c0038d6fbb485..3f0f0264abf01e4537c2c53900e784ba7f8fd258 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/mount.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "macro.h"
 #include "mount-util.h"
index 405434c1ffd405dfb98bab61cbe40be7e77b1bcd..ff0f044958b29ed12369999f38b21c0e170fa40f 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "macro.h"
index 1e2e42cbca1713440533d8faf51393895db5bbfb..07273ffe7921422eb60796a5ead7cfc2092959cc 100644 (file)
 
 #include <stdlib.h>
 
-#include "util.h"
-#include "set.h"
+#include "alloc-util.h"
 #include "prioq.h"
+#include "set.h"
 #include "siphash24.h"
+#include "util.h"
 
 #define SET_SIZE 1024*4
 
index 16a7148b19fd6be7fadb810b63e0bdb49a3fd748..fa448348da7b72527e734c3b106b8ab1a24ef510 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "log.h"
 #include "macro.h"
 #include "process-util.h"
index 4a2d952c86882cc443064c8b1e8a606bec5fb825..b9699b20283d1adfc5b527505d3981ec09e76d87 100644 (file)
@@ -17,6 +17,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "async.h"
 #include "fd-util.h"
 #include "in-addr-util.h"
index c676893719a3258eb3636cfca1eb27392a57cc6d..c27f15283ec91ea4e9455bedda4b56ef8a73c774 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <string.h>
 
+#include "alloc-util.h"
 #include "specifier.h"
 #include "string-util.h"
 #include "strv.h"
index 683fbe217ceea81e2a011846c89499224952e0f3..a8bd722e443c730098bb5605b5ca4e2384a52d32 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
index 9f69d71203dc29036a08b61ec36d43fd5e7b0482..4dcf10e26db46a59e61f405eb4a5b52dd83c1c38 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stddef.h>
 
+#include "alloc-util.h"
 #include "uid-range.h"
 #include "user-util.h"
 #include "util.h"
index 226453d06e5dfc5d02af8d398866b11457046cf2..c58c48af3cb33b800bf72f6bc9a75d3b04d9d473 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "hashmap.h"
index 5aff771af58deb59b297cd98b3d1b2b6518902ee..9db7853dd4fc1f37f2797adce03e88b843ff5a59 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "hostname-util.h"
 #include "macro.h"
 #include "manager.h"
index dfd20319985cbef1f6c06d074dc3a5bd2ce74cbb..09d37087e5ca7d79121d8a3877bbbd3ccfce7687 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "macro.h"
 #include "string-util.h"
 #include "user-util.h"
index a8e15b7cf12eab75dd387b5e4b5fc88a4962cb10..0af8349732e052d7641356b4d662f01d8f7d7dac 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "utf8.h"
 #include "util.h"
 #include "string-util.h"
index 647eff0496e615f2417e184bd26f493140359e37..ffde10c7e1d6fe134bfd3860745b575e346fa806 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/xattr.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "conf-parser.h"
 #include "cpu-set-util.h"
 #include "def.h"
index 93b0e7c3fbb447878f8ecaed096fd115d047eed1..548d75a3c302aee0f9aabd208b880ae0a00f0938 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdarg.h>
 
+#include "alloc-util.h"
 #include "string-util.h"
 #include "util.h"
 #include "xml.h"
index 507a83b2a1cb3d3862effe3559e9cc6fb473daa8..968ef8a7880f5fd88bcc78dba154b0174209fbc2 100644 (file)
@@ -27,6 +27,7 @@
 #include "sd-event.h"
 #include "sd-messages.h"
 
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
index ad6fd180e498f30218d2733cf70d238c6e31f2e9..be651fc636f2b4b0302b364d0e5f9a204b8a23ab 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "string-util.h"
 #include "timesyncd-manager.h"
 #include "timesyncd-server.h"
@@ -35,16 +36,16 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string)
         first = type == SERVER_FALLBACK ? m->fallback_servers : m->system_servers;
 
         for (;;) {
-                _cleanup_free_ char *word;
+                _cleanup_free_ char *word = NULL;
                 bool found = false;
                 ServerName *n;
 
                 r = extract_first_word(&string, &word, NULL, 0);
                 if (r < 0)
                         return log_error_errno(r, "Failed to parse timesyncd server syntax \"%s\": %m", string);
-
                 if (r == 0)
                         break;
+
                 /* Filter out duplicates */
                 LIST_FOREACH(names, n, first)
                         if (streq_ptr(n->string, word)) {
index 15ca006debb1a608f61001c0f18646602bfc4aa6..b4995c3064742343691ecb4be6203b1469f76c7a 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "sd-daemon.h"
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "list.h"
index ec3fe1fc4e891b8e8ce958715c2fa1c57d83d5c7..f98e6b4cf0052eefde2a008f02a93cb2e737e797 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "timesyncd-server.h"
 
 int server_address_new(
index 5196447963a0dc8f4b6046b4f59badb7304d5f6f..3c0b9993e35df8647ac93d18fa68720485f9fbdf 100644 (file)
@@ -39,6 +39,7 @@
 #include <unistd.h>
 
 #include "acl-util.h"
+#include "alloc-util.h"
 #include "btrfs-util.h"
 #include "capability-util.h"
 #include "chattr-util.h"
index a6240ae89a55e4cbd8617f31ffce9d7b833e1977..d2938f08725539defb5217625c9d08b5eddce73a 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/un.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "ask-password-api.h"
 #include "conf-parser.h"
 #include "def.h"
index b234792e237046e82994076a32d38bdf9e264378..b6c95cd4524e08a8a89f12873cc9e5b8d247a181 100644 (file)
@@ -24,6 +24,7 @@
 #include <stddef.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "libudev-private.h"
 #include "macro.h"
 #include "string-util.h"
index 972841b6d9bb617b309026a7263421caa473bad9..776674e9945369e822beaa23b1d1ceacabb7d5a3 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-netlink.h"
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "ethtool-util.h"
index 0976525eb32673dfed341946386026dd88284b38..d0e47ec6d888ae217f7b1ffbf07a1c2f844ed346 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "sd-id128.h"
 
+#include "alloc-util.h"
 #include "efivars.h"
 #include "fd-util.h"
 #include "gpt.h"
index 97a5a9c77f1155fcd976ff3e1de4b3845954467b..f4a065a97d8c2c6987a051aebfbb08dff8efbc6f 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "sd-hwdb.h"
 
+#include "alloc-util.h"
 #include "hwdb-util.h"
 #include "string-util.h"
 #include "udev-util.h"
index d4589470fb46b32fcf412b442dd93d14a44a6457..f72894b5c58bdaafdbb94ea28329b2fd19ab8f71 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "alloc-util.h"
 #include "link-config.h"
-#include "udev.h"
 #include "log.h"
+#include "udev.h"
 
 static link_config_ctx *ctx = NULL;
 
index 2c40988c7aaa7830746812fb3a5273abc2e89d1f..1e190140b2f42b5e2247ada5404b176068e6e84f 100644 (file)
@@ -30,6 +30,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "string-util.h"
 #include "udev.h"
 
index cb531bd168513feac4ea12fdb7236d1acbbbf13f..587649eff0aa6d15e5f306cd1c53875ec60db787 100644 (file)
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "string-util.h"
 #include "udev.h"
index 937fc4ecd86d8035c31547ce5de00a5f063a013b..1e05be51a549d6185301755ea74f06e19e2d19a3 100644 (file)
@@ -18,6 +18,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
 #include "socket-util.h"
index bf122f85c75c3b81ef0f104508b4f317d47ff2b8..6b4bd31281ecd2c424c784b0f0b37e70938739d5 100644 (file)
@@ -30,6 +30,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "event-util.h"
 #include "fd-util.h"
 #include "formats-util.h"
index 7d5f473d457b810aa03112c61a690fb967b8cde7..c06ace09cf171c9c877a90b35914e962c0f28371 100644 (file)
@@ -29,6 +29,7 @@
 #include <time.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "escape.h"
 #include "fd-util.h"
index 87468c43aefed813e64dd758a51ec1ed3b535d36..031a099d77b9f07b6c83af90d0865e694d37d483 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "alloc-util.h"
 #include "conf-files.h"
 #include "fileio.h"
 #include "fs-util.h"
index 60fc3179b0badbd901ad314ab1a88c9f8d11a29c..2c152129cce110e9770f63b7c61c4d1a98693953 100644 (file)
@@ -43,6 +43,7 @@
 #include "sd-daemon.h"
 #include "sd-event.h"
 
+#include "alloc-util.h"
 #include "cgroup-util.h"
 #include "cpu-set-util.h"
 #include "dev-setup.h"
index bcabf65a36dd89dec25486c76022553e766c704d..d50063cbcdd161620170a6199c47f93493c6ecce 100644 (file)
 
 #include "sd-bus.h"
 
+#include "alloc-util.h"
+#include "bus-error.h"
+#include "bus-util.h"
+#include "formats-util.h"
 #include "log.h"
 #include "macro.h"
-#include "util.h"
 #include "special.h"
-#include "utmp-wtmp.h"
-#include "bus-util.h"
-#include "bus-error.h"
 #include "unit-name.h"
-#include "formats-util.h"
+#include "util.h"
+#include "utmp-wtmp.h"
 
 typedef struct Context {
         sd_bus *bus;
index 2da28f8be0685ff40d03492a00e915885bcc04cc..2298f1c2a9984af36f648fa62ed5cb3b44baf5b8 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/ioctl.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "io-util.h"