]> granicus.if.org Git - libevent/commitdiff
extern "C" guard for header file.
authorNiels Provos <provos@gmail.com>
Sat, 27 Jan 2007 04:06:52 +0000 (04:06 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 27 Jan 2007 04:06:52 +0000 (04:06 +0000)
assert activeq in event.c;

from Phil Oelson.

svn:r313

evdns.h
event.c

diff --git a/evdns.h b/evdns.h
index ee272d205b55b9f917c982013581648e41d51ca9..d502564dfeed09ea0c967aa974090b477f875e13 100644 (file)
--- a/evdns.h
+++ b/evdns.h
 #ifndef EVENTDNS_H
 #define EVENTDNS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Error codes 0-5 are as described in RFC 1035. */
 #define DNS_ERR_NONE 0
 /* The name server was unable to interpret the query */
@@ -303,4 +307,8 @@ void evdns_set_log_fn(evdns_debug_log_fn_type fn);
 
 #define DNS_NO_SEARCH 1
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  // !EVENTDNS_H
diff --git a/event.c b/event.c
index 90f88ab6bd38c3ce1641ade8e6448bdddc2e14d1..f6d2b1cc42caa29cffaf4c90237f700b1f3eb8ce 100644 (file)
--- a/event.c
+++ b/event.c
@@ -301,6 +301,8 @@ event_process_active(struct event_base *base)
                }
        }
 
+       assert(activeq != NULL);
+
        for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) {
                event_queue_remove(base, ev, EVLIST_ACTIVE);