diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-12-12 17:58:18 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-12-12 18:37:41 +0100 |
commit | 2a71c1e3b81eee44e0dec88159e814681a1d0bc6 (patch) | |
tree | f689b4b18e366cfa4d38ddb96e2789163044428c /src | |
parent | d404c7e50bd487f9d8d3b13e5ff1c7fa878c7973 (diff) |
treewide: switch to libubox ARRAY_SIZE immplementation
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dhcpv6.c | 3 | ||||
-rw-r--r-- | src/odhcpd.h | 2 | ||||
-rw-r--r-- | src/router.c | 3 | ||||
-rw-r--r-- | src/ubus.c | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c index e4edf31..59bc422 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2013 Steven Barth <steven@midlink.org> + * Copyright (C) 2018 Hans Dedecker <dedeckeh@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -20,6 +21,8 @@ #include <sys/timerfd.h> #include <arpa/inet.h> +#include <libubox/utils.h> + #include "odhcpd.h" #include "dhcpv6.h" diff --git a/src/odhcpd.h b/src/odhcpd.h index ef94cfc..423deaa 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -33,8 +33,6 @@ #include <libubox/list.h> #include <libubox/uloop.h> -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - // RFC 6106 defines this router advertisement option #define ND_OPT_ROUTE_INFO 24 #define ND_OPT_RECURSIVE_DNS 25 diff --git a/src/router.c b/src/router.c index 70f9462..c02d675 100644 --- a/src/router.c +++ b/src/router.c @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2013 Steven Barth <steven@midlink.org> + * Copyright (C) 2018 Hans Dedecker <dedeckeh@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -23,6 +24,8 @@ #include <arpa/inet.h> #include <net/route.h> +#include <libubox/utils.h> + #include "router.h" #include "odhcpd.h" @@ -4,6 +4,8 @@ #include <netinet/in.h> #include <arpa/inet.h> +#include <libubox/utils.h> + #include "odhcpd.h" #include "dhcpv6.h" #include "dhcpv4.h" |