summaryrefslogtreecommitdiff
path: root/sql/hostname.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-19 09:57:09 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-19 09:57:09 +0100
commit16d8367aae66039476b834a6926bdd251ac100ae (patch)
tree476310f3017c1d9e98c4fdab805a347073c4f388 /sql/hostname.cc
parent94c97e5b68c83b4ade57a8739c1ba91a6e844279 (diff)
downloadmariadb-git-16d8367aae66039476b834a6926bdd251ac100ae.tar.gz
List<>-style template wrapper over hash_filo
Diffstat (limited to 'sql/hostname.cc')
-rw-r--r--sql/hostname.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/hostname.cc b/sql/hostname.cc
index 8a4df816057..11cd16ac857 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -126,7 +126,7 @@ void Host_errors::aggregate(const Host_errors *errors)
m_local+= errors->m_local;
}
-static hash_filo *hostname_cache;
+static Hash_filo<Host_entry> *hostname_cache;
ulong host_cache_size;
void hostname_cache_refresh()
@@ -149,7 +149,7 @@ bool hostname_cache_init()
Host_entry tmp;
uint key_offset= (uint) ((char*) (&tmp.ip_key) - (char*) &tmp);
- if (!(hostname_cache= new hash_filo(host_cache_size,
+ if (!(hostname_cache= new Hash_filo<Host_entry>(host_cache_size,
key_offset, HOST_ENTRY_KEY_SIZE,
NULL, (my_hash_free_key) free,
&my_charset_bin)))
@@ -187,11 +187,11 @@ static void prepare_hostname_cache_key(const char *ip_string,
}
Host_entry *hostname_cache_first()
-{ return (Host_entry *) hostname_cache->first(); }
+{ return hostname_cache->first(); }
static inline Host_entry *hostname_cache_search(const char *ip_key)
{
- return (Host_entry *) hostname_cache->search((uchar *) ip_key, 0);
+ return hostname_cache->search((uchar *) ip_key, 0);
}
static void add_hostname_impl(const char *ip_key, const char *hostname,