Make it compile under gcc --std=c89.

This commit is contained in:
Nick Mathewson 2010-01-23 16:23:45 -05:00
parent ff3f6cd42b
commit e2ca403fae
4 changed files with 3 additions and 9 deletions

View File

@ -100,7 +100,7 @@ evbuffer_commit_read(struct evbuffer *evbuf, ev_ssize_t nBytes)
EVBUFFER_LOCK(evbuf);
EVUTIL_ASSERT(buf->read_in_progress && !buf->write_in_progress);
EVUTIL_ASSERT(nBytes >= 0); // XXXX Can this be false?
EVUTIL_ASSERT(nBytes >= 0); /* XXXX Can this be false? */
evbuffer_unfreeze(evbuf, 0);

View File

@ -2850,7 +2850,7 @@ int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callb
? 0 : -1;
}
/*/////////////////////////////////////////////////////////////////// */
/* ================================================================= */
/* Search support */
/* */
/* the libc resolver has support for searching a number of domains */
@ -3121,7 +3121,7 @@ search_request_finished(struct evdns_request *const req) {
}
}
/*/////////////////////////////////////////////////////////////////// */
/* ================================================================= */
/* Parsing resolv.conf files */
static void

View File

@ -67,7 +67,6 @@ regress_pick_a_port(void *arg)
struct basic_test_data *data = arg;
struct event_base *base = data->base;
struct evconnlistener *listener1 = NULL, *listener2 = NULL;
//struct event *connecting;
struct sockaddr_in sin;
int count1 = 2, count2 = 1;
struct sockaddr_storage ss1, ss2;

View File

@ -77,7 +77,6 @@ loud_writecb(struct bufferevent *bev, void *ctx)
while (evbuffer_get_length(output) < 8192) {
evbuffer_add(output, buf, sizeof(buf));
cs->queued += sizeof(buf);
// printf("queued %d\n", (int)sizeof(buf));
}
}
@ -89,7 +88,6 @@ discard_readcb(struct bufferevent *bev, void *ctx)
size_t len = evbuffer_get_length(input);
evbuffer_drain(input, len);
cs->received += len;
// printf("read %d bytes\n", (int)len);
}
static void
@ -108,9 +106,7 @@ echo_readcb(struct bufferevent *bev, void *ctx)
struct evbuffer *input = bufferevent_get_input(bev);
struct evbuffer *output = bufferevent_get_output(bev);
// puts("read.");
evbuffer_add_buffer(output, input);
// printf(" outbuf len is now %d\n", (int)evbuffer_get_length(output));
if (evbuffer_get_length(output) > 1024000)
bufferevent_disable(bev, EV_READ);
}
@ -191,7 +187,6 @@ test_ratelimiting(void)
states = calloc(cfg_n_connections, sizeof(struct client_state));
for (i = 0; i < cfg_n_connections; ++i) {
// printf("creating %d:\n",i);
bevs[i] = bufferevent_socket_new(base, -1,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE);
assert(bevs[i]);