util-lib: split out allocation calls into alloc-util.[ch]

This commit is contained in:
Lennart Poettering
2015-10-27 13:45:53 +01:00
parent 7d50b32a12
commit b5efdb8af4
399 changed files with 692 additions and 233 deletions
+1 -1
View 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"
+3 -3
View File
@@ -19,10 +19,11 @@
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;
+1
View 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"
+1
View 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"
+1
View 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"
+2 -2
View File
@@ -19,10 +19,10 @@
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 */
+2 -1
View 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;
+1
View File
@@ -21,6 +21,7 @@
#include <math.h>
#include "alloc-util.h"
#include "dns-domain.h"
#include "dns-type.h"
#include "hexdecoct.h"
+1
View 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"
+2 -2
View 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)
+1
View File
@@ -21,6 +21,7 @@
#include <netinet/tcp.h>
#include "alloc-util.h"
#include "fd-util.h"
#include "io-util.h"
#include "missing.h"
+1
View 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"
+1
View 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"
+1
View File
@@ -23,6 +23,7 @@
#include "sd-network.h"
#include "alloc-util.h"
#include "missing.h"
#include "parse-util.h"
#include "resolved-link.h"
+1
View 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"