From: Roy Marples Date: Mon, 6 Oct 2008 12:45:32 +0000 (+0000) Subject: static objects are initialized to 0 by default, so don't explicity do this. X-Git-Tag: v5.0.0~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35a8183fb9d41cd62d1b1689ffe9953fff677aa9;p=thirdparty%2Fdhcpcd.git static objects are initialized to 0 by default, so don't explicity do this. --- diff --git a/configure.c b/configure.c index 1dadc186..d4652aa5 100644 --- a/configure.c +++ b/configure.c @@ -59,7 +59,7 @@ # endif #endif -static struct rt *routes = NULL; +static struct rt *routes; static int exec_script(char *const *argv, char *const *env) diff --git a/dhcp.c b/dhcp.c index bfa5f262..d10476f8 100644 --- a/dhcp.c +++ b/dhcp.c @@ -56,7 +56,7 @@ /* Our aggregate option buffer. * We ONLY use this when options are split, which for most purposes is * practically never. See RFC3396 for details. */ -static uint8_t *dhcp_opt_buffer = NULL; +static uint8_t *dhcp_opt_buffer; struct dhcp_opt { uint8_t option; diff --git a/dhcpcd.c b/dhcpcd.c index 8bb2eca4..39af2ce7 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -73,10 +73,10 @@ char **ifav = NULL; int ifdc = 0; char **ifdv = NULL; -static char **ifv = NULL; -static int ifc = 0; +static char **ifv; +static int ifc; static int linkfd = -1; -static char *cffile = NULL; +static char *cffile; static char *pidfile; struct dhcp_op { diff --git a/eloop.c b/eloop.c index 4b9b6b6a..a2432cd3 100644 --- a/eloop.c +++ b/eloop.c @@ -37,26 +37,26 @@ #include "common.h" #include "eloop.h" -static struct timeval now = {0, 0}; +static struct timeval now; static struct event { int fd; void (*callback)(void *); void *arg; struct event *next; -} *events = NULL; -static struct event *free_events = NULL; +} *events; +static struct event *free_events; static struct timeout { struct timeval when; void (*callback)(void *); void *arg; struct timeout *next; -} *timeouts = NULL; -static struct timeout *free_timeouts = NULL; +} *timeouts; +static struct timeout *free_timeouts; -static struct pollfd *fds = NULL; -static size_t fds_len = 0; +static struct pollfd *fds; +static size_t fds_len; void add_event(int fd, void (*callback)(void *), void *arg) diff --git a/if-linux.c b/if-linux.c index 3fecfe04..738b5ec0 100644 --- a/if-linux.c +++ b/if-linux.c @@ -68,9 +68,9 @@ #define BUFFERLEN 256 -static void (*nl_carrier)(const char *) = NULL; -static void (*nl_add)(const char *) = NULL; -static void (*nl_remove)(const char *) = NULL; +static void (*nl_carrier)(const char *); +static void (*nl_add)(const char *); +static void (*nl_remove)(const char *); int if_wireless(const char *ifname)