]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
static objects are initialized to 0 by default, so don't explicity do this.
authorRoy Marples <roy@marples.name>
Mon, 6 Oct 2008 12:45:32 +0000 (12:45 +0000)
committerRoy Marples <roy@marples.name>
Mon, 6 Oct 2008 12:45:32 +0000 (12:45 +0000)
configure.c
dhcp.c
dhcpcd.c
eloop.c
if-linux.c

index 1dadc1864d6c877758c1cd2c99f7686bff7a060b..d4652aa57afdfe51da7766f883389d1f2147bc02 100644 (file)
@@ -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 bfa5f262abd2ffd4f6f8e8dbc81566674a342c4b..d10476f8645d9b4d394a3d1d6df4b37e40613f4c 100644 (file)
--- 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;
index 8bb2eca4b8f0eb4cf400d4be16a092323e4e5acf..39af2ce7443deab1f310da737f1f9b172610be6e 100644 (file)
--- 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 4b9b6b6a98470f6f53ee1dae2a1d51987b6607e3..a2432cd3c9226e9cb686d17f9fb588ad9620a277 100644 (file)
--- a/eloop.c
+++ b/eloop.c
 #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)
index 3fecfe0407837d4060259466ca2aa38431b2b055..738b5ec0113e9cd679a50744637409da974a6f85 100644 (file)
@@ -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)