From 34bbb7a1b8d1425d8ba55d188ec3f5fe9d5c18d7 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 19 Jan 2024 14:32:02 +0000 Subject: [PATCH] Fix FTBFS introduced in 2748d4e901193c919614276e42d6d54b11f3232d --- src/option.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/option.c b/src/option.c index b04fbb3..0cb691e 100644 --- a/src/option.c +++ b/src/option.c @@ -1282,6 +1282,17 @@ static char *domain_rev6(int from_file, char *server, struct in6_addr *addr6, in return NULL; } +static void if_names_add(const char *ifname) +{ + struct iname *new = opt_malloc(sizeof(struct iname)); + new->next = daemon->if_names; + daemon->if_names = new; + /* new->name may be NULL if someone does + "interface=" to disable all interfaces except loop. */ + new->name = opt_string_alloc(ifname); + new->flags = 0; +} + #ifdef HAVE_DHCP static int is_tag_prefix(char *arg) @@ -1411,17 +1422,6 @@ static void dhcp_opt_free(struct dhcp_opt *opt) free(opt); } -static void if_names_add(const char *ifname) -{ - struct iname *new = opt_malloc(sizeof(struct iname)); - new->next = daemon->if_names; - daemon->if_names = new; - /* new->name may be NULL if someone does - "interface=" to disable all interfaces except loop. */ - new->name = opt_string_alloc(ifname); - new->flags = 0; -} - /* This is too insanely large to keep in-line in the switch */ static int parse_dhcp_opt(char *errstr, char *arg, int flags) { -- 2.20.1