From: Daniel Wagner <[email protected]>
---
src/counter.c | 6 +++---
src/dhcp.c | 2 +-
src/dhcpv6.c | 2 +-
src/dnsproxy.c | 8 ++++----
src/ippool.c | 16 ++++++++--------
src/log.c | 4 ++--
src/manager.c | 2 +-
src/nat.c | 4 ++--
src/notifier.c | 2 +-
src/session.c | 10 +++++-----
src/stats.c | 2 +-
src/task.c | 4 ++--
src/technology.c | 6 +++---
src/tethering.c | 6 +++---
14 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/counter.c b/src/counter.c
index 76d91d4..b0acabf 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -29,10 +29,10 @@
#include "connman.h"
-static DBusConnection *connection;
+static DBusConnection *connection = NULL;
-static GHashTable *counter_table;
-static GHashTable *owner_mapping;
+static GHashTable *counter_table = NULL;
+static GHashTable *owner_mapping = NULL;
struct connman_counter {
char *owner;
diff --git a/src/dhcp.c b/src/dhcp.c
index 1dbe1ba..ee02b5c 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -47,7 +47,7 @@ struct connman_dhcp {
GDHCPClient *dhcp_client;
};
-static GHashTable *network_table;
+static GHashTable *network_table = NULL;
static void dhcp_free(struct connman_dhcp *dhcp)
{
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 1d724e5..c881451 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -70,7 +70,7 @@ struct connman_dhcpv6 {
gboolean started; /* TRUE if we have DHCPv6 started */
};
-static GHashTable *network_table;
+static GHashTable *network_table = NULL;
static int dhcpv6_request(struct connman_dhcpv6 *dhcp, gboolean add_addresses);
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 719c170..492735b 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -180,13 +180,13 @@ struct domain_rr {
*/
#define MAX_CACHE_SIZE 256
-static int cache_size;
-static GHashTable *cache;
-static int cache_refcount;
+static int cache_size = 0;
+static GHashTable *cache = NULL;
+static int cache_refcount = 0;
static GSList *server_list = NULL;
static GSList *request_list = NULL;
static GHashTable *listener_table = NULL;
-static time_t next_refresh;
+static time_t next_refresh = 0;
static guint16 get_id()
{
diff --git a/src/ippool.c b/src/ippool.c
index 52446ce..b60db61 100644
--- a/src/ippool.c
+++ b/src/ippool.c
@@ -58,14 +58,14 @@ struct connman_ippool {
void *user_data;
};
-GSList *allocated_blocks;
-GHashTable *pool_hash;
-
-static uint32_t last_block;
-static uint32_t block_16_bits;
-static uint32_t block_20_bits;
-static uint32_t block_24_bits;
-static uint32_t subnet_mask_24;
+static GSList *allocated_blocks = NULL;
+static GHashTable *pool_hash = NULL;
+
+static uint32_t last_block = 0;
+static uint32_t block_16_bits = 0;
+static uint32_t block_20_bits = 0;
+static uint32_t block_24_bits = 0;
+static uint32_t subnet_mask_24 = 0;
struct connman_ippool *
__connman_ippool_ref_debug(struct connman_ippool *pool,
diff --git a/src/log.c b/src/log.c
index 9a68a4b..dbea397 100644
--- a/src/log.c
+++ b/src/log.c
@@ -35,8 +35,8 @@
#include "connman.h"
-static const char *program_exec;
-static const char *program_path;
+static const char *program_exec = NULL;
+static const char *program_path = NULL;
/**
* connman_info:
diff --git a/src/manager.c b/src/manager.c
index 205359a..bfa4611 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -29,7 +29,7 @@
#include "connman.h"
-static connman_bool_t connman_state_idle;
+static connman_bool_t connman_state_idle = FALSE;
static DBusMessage *session_mode_pending = NULL;
static DBusMessage *get_properties(DBusConnection *conn,
diff --git a/src/nat.c b/src/nat.c
index e17a3f8..a1a6d67 100644
--- a/src/nat.c
+++ b/src/nat.c
@@ -29,8 +29,8 @@
#include "connman.h"
-static char *default_interface;
-static GHashTable *nat_hash;
+static char *default_interface = NULL;
+static GHashTable *nat_hash = NULL;
struct connman_nat {
char *address;
diff --git a/src/notifier.c b/src/notifier.c
index ebde689..e35f2ec 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -32,7 +32,7 @@ static DBusConnection *connection = NULL;
static GSList *notifier_list = NULL;
static GHashTable *service_hash = NULL;
-static const char *notifier_state;
+static const char *notifier_state = NULL;
static gint compare_priority(gconstpointer a, gconstpointer b)
{
diff --git a/src/session.c b/src/session.c
index 3d497b8..6ef4377 100644
--- a/src/session.c
+++ b/src/session.c
@@ -32,11 +32,11 @@
#include "connman.h"
-static DBusConnection *connection;
-static GHashTable *session_hash;
-static connman_bool_t sessionmode;
-static struct connman_session *ecall_session;
-static GSList *policy_list;
+static DBusConnection *connection = NULL;
+static GHashTable *session_hash = NULL;
+static connman_bool_t sessionmode = FALSE;
+static struct connman_session *ecall_session = NULL;
+static GSList *policy_list = NULL;
enum connman_session_trigger {
CONNMAN_SESSION_TRIGGER_UNKNOWN = 0,
diff --git a/src/stats.c b/src/stats.c
index 828c1ef..426cc7c 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -125,7 +125,7 @@ struct stats_iter {
struct stats_record *it;
};
-GHashTable *stats_hash = NULL;
+static GHashTable *stats_hash = NULL;
static struct stats_file_header *get_hdr(struct stats_file *file)
{
diff --git a/src/task.c b/src/task.c
index 60e336a..2761dce 100644
--- a/src/task.c
+++ b/src/task.c
@@ -51,9 +51,9 @@ struct connman_task {
static GHashTable *task_hash = NULL;
-static volatile int task_counter;
+static volatile int task_counter = 0;
-static DBusConnection *connection;
+static DBusConnection *connection = NULL;
static void free_pointer(gpointer data, gpointer user_data)
{
diff --git a/src/technology.c b/src/technology.c
index d78e7b3..f4149a9 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -30,7 +30,7 @@
#include "connman.h"
-static DBusConnection *connection;
+static DBusConnection *connection = NULL;
static GSList *technology_list = NULL;
@@ -39,9 +39,9 @@ static GSList *technology_list = NULL;
* no compiled in support or the driver is not yet loaded.
*/
static GSList *techless_device_list = NULL;
-static GHashTable *rfkill_list;
+static GHashTable *rfkill_list = NULL;
-static connman_bool_t global_offlinemode;
+static connman_bool_t global_offlinemode = FALSE;
struct connman_rfkill {
unsigned int index;
diff --git a/src/tethering.c b/src/tethering.c
index f3d67df..6f960de 100644
--- a/src/tethering.c
+++ b/src/tethering.c
@@ -55,11 +55,11 @@
#define PRIVATE_NETWORK_PRIMARY_DNS BRIDGE_DNS
#define PRIVATE_NETWORK_SECONDARY_DNS "8.8.4.4"
-static volatile int tethering_enabled;
+static volatile int tethering_enabled = 0;
static GDHCPServer *tethering_dhcp_server = NULL;
static struct connman_ippool *dhcp_ippool = NULL;
-static DBusConnection *connection;
-static GHashTable *pn_hash;
+static DBusConnection *connection = NULL;
+static GHashTable *pn_hash = NULL;
struct connman_private_network {
char *owner;
--
1.8.0.rc0
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman