Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
f3350b67
Commit
f3350b67
authored
Mar 05, 2013
by
Mark Andrews
Browse files
silence compiler warnings
parent
ab8ea5c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
bin/named/server.c
View file @
f3350b67
...
...
@@ -170,7 +170,7 @@
* a cache. Only effective when a finite max-cache-size is specified.
* This is currently defined to be 8MB.
*/
#define MAX_ADB_SIZE_FOR_CACHESHARE 8388608
#define MAX_ADB_SIZE_FOR_CACHESHARE 8388608
U
struct
ns_dispatch
{
isc_sockaddr_t
addr
;
...
...
@@ -2686,9 +2686,9 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
* MAX_ADB_SIZE_FOR_CACHESHARE when the cache is shared.
*/
max_adb_size
=
0
;
if
(
max_cache_size
!=
0
)
{
if
(
max_cache_size
!=
0
U
)
{
max_adb_size
=
max_cache_size
/
8
;
if
(
max_adb_size
==
0
)
if
(
max_adb_size
==
0
U
)
max_adb_size
=
1
;
/* Force minimum. */
if
(
view
!=
nsc
->
primaryview
&&
max_adb_size
>
MAX_ADB_SIZE_FOR_CACHESHARE
)
{
...
...
lib/dns/acache.c
View file @
f3350b67
...
...
@@ -73,10 +73,10 @@
* (XXX simply derived from definitions in cache.c There may be better
* constants here.)
*/
#define DNS_ACACHE_MINSIZE 2097152
/* Bytes. 2097152 = 2 MB */
#define DNS_ACACHE_CLEANERINCREMENT 1000
/* Number of entries. */
#define DNS_ACACHE_MINSIZE 2097152
U
/* Bytes. 2097152 = 2 MB */
#define DNS_ACACHE_CLEANERINCREMENT 1000
/* Number of entries. */
#define DEFAULT_ACACHE_ENTRY_LOCK_COUNT 1009
/*%< Should be prime. */
#define DEFAULT_ACACHE_ENTRY_LOCK_COUNT 1009
/*%< Should be prime. */
#if defined(ISC_RWLOCK_USEATOMIC) && defined(ISC_PLATFORM_HAVEATOMICSTORE)
#define ACACHE_USE_RWLOCK 1
...
...
@@ -1774,13 +1774,13 @@ dns_acache_setcachesize(dns_acache_t *acache, size_t size) {
REQUIRE
(
DNS_ACACHE_VALID
(
acache
));
if
(
size
!=
0
&&
size
<
DNS_ACACHE_MINSIZE
)
if
(
size
!=
0
U
&&
size
<
DNS_ACACHE_MINSIZE
)
size
=
DNS_ACACHE_MINSIZE
;
hiwater
=
size
-
(
size
>>
3
);
lowater
=
size
-
(
size
>>
2
);
if
(
size
==
0
||
hiwater
==
0
||
lowater
==
0
)
if
(
size
==
0
U
||
hiwater
==
0
U
||
lowater
==
0
U
)
isc_mem_setwater
(
acache
->
mctx
,
water
,
acache
,
0
,
0
);
else
isc_mem_setwater
(
acache
->
mctx
,
water
,
acache
,
...
...
lib/dns/adb.c
View file @
f3350b67
...
...
@@ -89,7 +89,7 @@
#define DNS_ADB_INVALIDBUCKET (-1)
/*%< invalid bucket address */
#define DNS_ADB_MINADBSIZE (1024*1024)
/*%< 1 Megabyte */
#define DNS_ADB_MINADBSIZE (1024
U
*1024
U
)
/*%< 1 Megabyte */
typedef
ISC_LIST
(
dns_adbname_t
)
dns_adbnamelist_t
;
typedef
struct
dns_adbnamehook
dns_adbnamehook_t
;
...
...
@@ -4169,13 +4169,13 @@ dns_adb_setadbsize(dns_adb_t *adb, size_t size) {
INSIST
(
DNS_ADB_VALID
(
adb
));
if
(
size
!=
0
&&
size
<
DNS_ADB_MINADBSIZE
)
if
(
size
!=
0
U
&&
size
<
DNS_ADB_MINADBSIZE
)
size
=
DNS_ADB_MINADBSIZE
;
hiwater
=
size
-
(
size
>>
3
);
/* Approximately 7/8ths. */
lowater
=
size
-
(
size
>>
2
);
/* Approximately 3/4ths. */
if
(
size
==
0
||
hiwater
==
0
||
lowater
==
0
)
if
(
size
==
0
U
||
hiwater
==
0
U
||
lowater
==
0
U
)
isc_mem_setwater
(
adb
->
mctx
,
water
,
adb
,
0
,
0
);
else
isc_mem_setwater
(
adb
->
mctx
,
water
,
adb
,
hiwater
,
lowater
);
...
...
lib/dns/cache.c
View file @
f3350b67
...
...
@@ -53,7 +53,7 @@
* DNS_CACHE_MINSIZE is how many bytes is the floor for dns_cache_setcachesize().
* See also DNS_CACHE_CLEANERINCREMENT
*/
#define DNS_CACHE_MINSIZE 2097152
/*%< Bytes. 2097152 = 2 MB */
#define DNS_CACHE_MINSIZE 2097152
U
/*%< Bytes. 2097152 = 2 MB */
/*!
* Control incremental cleaning.
* CLEANERINCREMENT is how many nodes are examined in one pass.
...
...
@@ -1057,7 +1057,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
* Impose a minimum cache size; pathological things happen if there
* is too little room.
*/
if
(
size
!=
0
&&
size
<
DNS_CACHE_MINSIZE
)
if
(
size
!=
0
U
&&
size
<
DNS_CACHE_MINSIZE
)
size
=
DNS_CACHE_MINSIZE
;
LOCK
(
&
cache
->
lock
);
...
...
@@ -1074,7 +1074,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
* water().
*/
if
(
size
==
0
||
hiwater
==
0
||
lowater
==
0
)
if
(
size
==
0
U
||
hiwater
==
0
U
||
lowater
==
0
U
)
/*
* Disable cache memory limiting.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment