summaryrefslogtreecommitdiff
path: root/src/domain.c
diff options
context:
space:
mode:
authorportix <none@none>2012-12-06 11:10:23 +0100
committerportix <none@none>2012-12-06 11:10:23 +0100
commitcfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1 (patch)
treeda5a2e74c2d65b7ffbac09bda9f4837189389297 /src/domain.c
parentbe66d769983932d782e669257f95a6a71114c6cf (diff)
downloaddwb-cfe31126f94c76ee9c2f1d5c7bfb13f31b9efcc1.zip
Indentation of adblock.c, renaming static variables
Diffstat (limited to 'src/domain.c')
-rw-r--r--src/domain.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/domain.c b/src/domain.c
index 437466f1..70e16b75 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -21,7 +21,7 @@
#include "domain.h"
#include "tlds.h"
-static GHashTable *m_tld_table;
+static GHashTable *s_tld_table;
GSList *
domain_get_cookie_domains(WebKitWebView *wv)
@@ -129,7 +129,7 @@ domain_get_base_for_host(const char *host)
{
if (host == NULL)
return NULL;
- g_return_val_if_fail(m_tld_table != NULL, NULL);
+ g_return_val_if_fail(s_tld_table != NULL, NULL);
const char *cur_domain = host;
const char *prev_domain = host;
@@ -140,7 +140,7 @@ domain_get_base_for_host(const char *host)
while (1)
{
- entry = g_hash_table_lookup(m_tld_table, cur_domain);
+ entry = g_hash_table_lookup(s_tld_table, cur_domain);
if (entry != NULL)
{
if (*entry == '*')
@@ -177,10 +177,10 @@ domain_get_base_for_host(const char *host)
void
domain_end()
{
- if (m_tld_table)
+ if (s_tld_table)
{
- g_hash_table_unref(m_tld_table);
- m_tld_table = NULL;
+ g_hash_table_unref(s_tld_table);
+ s_tld_table = NULL;
}
}
@@ -188,7 +188,7 @@ domain_end()
void
domain_init()
{
- m_tld_table = g_hash_table_new((GHashFunc)g_str_hash, (GEqualFunc)g_str_equal);
+ s_tld_table = g_hash_table_new((GHashFunc)g_str_hash, (GEqualFunc)g_str_equal);
char *eff_tld;
for (int i=0; (eff_tld = TLDS_EFFECTIVE[i]); i++)
{
@@ -198,6 +198,6 @@ domain_init()
if (*eff_tld == '.')
eff_tld++;
- g_hash_table_insert(m_tld_table, eff_tld, TLDS_EFFECTIVE[i]);
+ g_hash_table_insert(s_tld_table, eff_tld, TLDS_EFFECTIVE[i]);
}
}