summaryrefslogtreecommitdiff
path: root/src/blockdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockdata.c')
-rw-r--r--src/blockdata.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blockdata.c b/src/blockdata.c
index c8f5eae..72f0575 100644
--- a/src/blockdata.c
+++ b/src/blockdata.c
@@ -1,4 +1,4 @@
-/* dnsmasq is Copyright (c) 2000-2015 Simon Kelley
+/* dnsmasq is Copyright (c) 2000-2018 Simon Kelley
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ static void blockdata_expand(int n)
{
struct blockdata *new = whine_malloc(n * sizeof(struct blockdata));
- if (n > 0 && new)
+ if (new)
{
int i;
@@ -49,7 +49,7 @@ void blockdata_init(void)
/* Note that daemon->cachesize is enforced to have non-zero size if OPT_DNSSEC_VALID is set */
if (option_bool(OPT_DNSSEC_VALID))
- blockdata_expand((daemon->cachesize * 100) / sizeof(struct blockdata));
+ blockdata_expand(daemon->cachesize);
}
void blockdata_report(void)
@@ -100,6 +100,7 @@ struct blockdata *blockdata_alloc(char *data, size_t len)
return ret;
}
+
void blockdata_free(struct blockdata *blocks)
{
struct blockdata *tmp;