[NeoStats-Devel] [Commits] r2494 - trunk/src
[email protected] Sun, 10 Apr 2005 01:28:34 +1000
Newsgroups
gmane.comp.neostats.devel
Message-ID
<[email protected] >
Author: DNB
Date: Sat Apr 9 23:28:27 2005
New Revision: 2494
Modified:
trunk/src/adnscheck.c
Log:
fix compile on BSD (problem with CR/LF in file instead of just LF)
Modified: trunk/src/adnscheck.c
==============================================================================
--- trunk/src/adnscheck.c (original)
+++ trunk/src/adnscheck.c Sat Apr 9 23:28:27 2005
@@ -36,27 +36,27 @@
adns__consistency(ads, qu, cc_user);
}
-#define DLIST_CHECK1(list, nodevar, body) \
- if ((list).head) { \
- assert(! (list).head->back); \
- for ((nodevar)= (list).head; (nodevar); (nodevar)= (nodevar)->next) { \
- assert((nodevar)->next \
- ? (nodevar) == (nodevar)->next->back \
- : (nodevar) == (list).tail); \
- body \
- } \
- }
-
-#define DLIST_CHECK2(list, nodevar, part, body) \
- if ((list).head) { \
- assert(! (list).head->part.back); \
- for ((nodevar)= (list).head; (nodevar); (nodevar)= (nodevar)->part.next) { \
- assert((nodevar)->part.next \
- ? (nodevar) == (nodevar)->part.next->part.back \
- : (nodevar) == (list).tail); \
- body \
- } \
- }
+#define DLIST_CHECK1(list, nodevar, body) \
+ if ((list).head) { \
+ assert(! (list).head->back); \
+ for ((nodevar)= (list).head; (nodevar); (nodevar)= (nodevar)->next) { \
+ assert((nodevar)->next \
+ ? (nodevar) == (nodevar)->next->back \
+ : (nodevar) == (list).tail); \
+ body \
+ } \
+ }
+
+#define DLIST_CHECK2(list, nodevar, part, body) \
+ if ((list).head) { \
+ assert(! (list).head->part.back); \
+ for ((nodevar)= (list).head; (nodevar); (nodevar)= (nodevar)->part.next) { \
+ assert((nodevar)->part.next \
+ ? (nodevar) == (nodevar)->part.next->part.back \
+ : (nodevar) == (list).tail); \
+ body \
+ } \
+ }
#define DLIST_ASSERTON(node, nodevar, list, part) \
do { \
@@ -71,7 +71,7 @@
{
allocnode *an;
- DLIST_CHECK1(qu->allocations, an, {
+ DLIST_CHECK1(qu->allocations, an, {
});
}
@@ -129,56 +129,56 @@
{
adns_query qu;
- DLIST_CHECK1(ads->udpw, qu, {
+ DLIST_CHECK1(ads->udpw, qu, {
assert(qu->state == query_tosend);
assert(qu->retries <= UDPMAXRETRIES);
assert(qu->udpsent);
assert(!qu->children.head && !qu->children.tail);
- checkc_query(ads,qu);
- checkc_query_alloc(ads,qu);
- });
+ checkc_query(ads,qu);
+ checkc_query_alloc(ads,qu);
+ });
}
static void checkc_queue_tcpw(adns_state ads)
{
adns_query qu;
- DLIST_CHECK1(ads->tcpw, qu, {
+ DLIST_CHECK1(ads->tcpw, qu, {
assert(qu->state == query_tcpw);
assert(!qu->children.head && !qu->children.tail);
assert(qu->retries <= ads->nservers + 1);
- checkc_query(ads,qu);
- checkc_query_alloc(ads,qu);
- });
+ checkc_query(ads,qu);
+ checkc_query_alloc(ads,qu);
+ });
}
static void checkc_queue_childw(adns_state ads)
{
adns_query parent, child;
- DLIST_CHECK1(ads->childw, parent, {
+ DLIST_CHECK1(ads->childw, parent, {
assert(parent->state == query_childw);
assert(parent->children.head);
- DLIST_CHECK2(parent->children, child, siblings, {
+ DLIST_CHECK2(parent->children, child, siblings, {
assert(child->parent == parent);
- assert(child->state != query_done);
- });
+ assert(child->state != query_done);
+ });
checkc_query(ads, parent);
- checkc_query_alloc(ads,parent);
- });
+ checkc_query_alloc(ads,parent);
+ });
}
static void checkc_queue_output(adns_state ads)
{
adns_query qu;
- DLIST_CHECK1(ads->output, qu, {
+ DLIST_CHECK1(ads->output, qu, {
assert(qu->state == query_done);
assert(!qu->children.head && !qu->children.tail);
assert(!qu->parent);
assert(!qu->allocations.head && !qu->allocations.tail);
- checkc_query(ads,qu);
- });
+ checkc_query(ads,qu);
+ });
}
void adns__consistency(adns_state ads, adns_query qu, consistency_checks cc)