]> granicus.if.org Git - libevent/commitdiff
Clean up formatting: Disallow space-before-tab.
authorNick Mathewson <nickm@torproject.org>
Thu, 18 Feb 2010 22:08:50 +0000 (17:08 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 18 Feb 2010 22:08:50 +0000 (17:08 -0500)
bufferevent_filter.c
bufferevent_sock.c
event.c
evport.c
http.c
include/event2/bufferevent_compat.h
include/event2/dns.h
sample/le-proxy.c
test/regress_http.c
test/regress_rpc.c
util-internal.h

index b7e1bc6a9da5258bc0e2cf7b03dd4ceb855fbf52..1cecfa45f32e1c0583710671a914a65dd38312e6 100644 (file)
@@ -265,7 +265,7 @@ be_filter_process_input(struct bufferevent_filtered *bevf,
        } while (res == BEV_OK &&
                 (bev->enabled & EV_READ) &&
                 evbuffer_get_length(bevf->underlying->input) &&
-                !be_readbuf_full(bevf, state));
+                !be_readbuf_full(bevf, state));
 
        if (*processed_out)
                BEV_RESET_GENERIC_READ_TIMEOUT(bev);
index 7ce42667d7d589f3ba8919705f9e358901bd4692..006c8ec5062263ca5f2f8462faaf47d2f80ce1a7 100644 (file)
@@ -223,7 +223,7 @@ bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
                } else {
                        connected = 1;
 #ifdef WIN32
-                       if (BEV_IS_ASYNC(bufev)) {
+                       if (BEV_IS_ASYNC(bufev)) {
                                event_del(&bufev->ev_write);
                                bufferevent_async_set_connected(bufev);
                                _bufferevent_run_eventcb(bufev,
diff --git a/event.c b/event.c
index 43e49e98771191d3349f378b452e2f7664b92a9e..3b94c24197a94324f669a684529e1a3d539de409 100644 (file)
--- a/event.c
+++ b/event.c
@@ -211,7 +211,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
                find.ptr = (ev);                                        \
                EVLOCK_LOCK(_event_debug_map_lock, 0);                  \
                dent = HT_REMOVE(event_debug_map, &global_debug_map, &find); \
-               if (dent)                                               \
+               if (dent)                                               \
                        mm_free(dent);                                  \
                EVLOCK_UNLOCK(_event_debug_map_lock, 0);                \
        }                                                               \
@@ -1537,7 +1537,7 @@ event_set(struct event *ev, evutil_socket_t fd, short events,
 {
        int r;
        r = event_assign(ev, current_base, fd, events, callback, arg);
-               EVUTIL_ASSERT(r == 0);
+       EVUTIL_ASSERT(r == 0);
 }
 
 struct event *
index 1baac621168d0b143b3e0bc1d3a27c75db7157a3..2a70377405d5ac353f00c97adbdf57b7d27c4df2 100644 (file)
--- a/evport.c
+++ b/evport.c
@@ -100,9 +100,9 @@ struct fd_info {
     (FDI_HAS_WRITE(fdi) ? POLLOUT : 0)
 
 struct evport_data {
-       int             ed_port;        /* event port for system events  */
-       int             ed_nevents;     /* number of allocated fdi's     */
-       struct fd_info *ed_fds;         /* allocated fdi table           */
+       int             ed_port;        /* event port for system events  */
+       int             ed_nevents;     /* number of allocated fdi's     */
+       struct fd_info *ed_fds;         /* allocated fdi table           */
        /* fdi's that we need to reassoc */
        int ed_pending[EVENTS_PER_GETN]; /* fd's with pending events */
 };
@@ -110,7 +110,7 @@ struct evport_data {
 static void*   evport_init     (struct event_base *);
 static int evport_add(struct event_base *, int fd, short old, short events, void *);
 static int evport_del(struct event_base *, int fd, short old, short events, void *);
-static int     evport_dispatch (struct event_base *, struct timeval *);
+static int     evport_dispatch (struct event_base *, struct timeval *);
 static void    evport_dealloc  (struct event_base *);
 
 const struct eventop evportops = {
diff --git a/http.c b/http.c
index e17808ef1f4eb810521e9b8328a51cefb6c59d4e..24eb46c7e617af9acc6ba77409624244b1ee05de 100644 (file)
--- a/http.c
+++ b/http.c
@@ -755,7 +755,7 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
                                return (DATA_CORRUPTED);
                        }
                        if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) {
-                               /* failed body length test */
+                               /* failed body length test */
                                event_debug(("Request body is too long"));
                                return (DATA_TOO_LONG);
                        }
@@ -853,7 +853,7 @@ evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
        }
 
        if (req->body_size > req->evcon->max_body_size) {
-               /* failed body length test */
+               /* failed body length test */
                event_debug(("Request body is too long"));
                evhttp_connection_fail(evcon,
                                       EVCON_HTTP_INVALID_HEADER);
index 1592baa7ba8e10de9d3d8ba8657ba9c4bd02700c..ae541842a57af86302730167343e1f7367f75d5b 100644 (file)
@@ -55,7 +55,7 @@
   enabling the bufferevent for the first time.
 
   @param fd the file descriptor from which data is read and written to.
-               This file descriptor is not allowed to be a pipe(2).
+         This file descriptor is not allowed to be a pipe(2).
   @param readcb callback to invoke when there is data to be read, or NULL if
          no callback is desired
   @param writecb callback to invoke when the file descriptor is ready for
index 3adabf70684c7d54f2a269db57c7a2c6add12d4e..8cb1dedfefd3943a891b1e3d96a857e8647ff5ff 100644 (file)
@@ -38,7 +38,7 @@
  *
  * I ask and expect, but do not require, that all derivative works contain an
  * attribution similar to:
- *     Parts developed by Adam Langley <agl@imperialviolet.org>
+ *     Parts developed by Adam Langley <agl@imperialviolet.org>
  *
  * You may wish to replace the word "Parts" with something else depending on
  * the amount of original code.
index 78474a1248b0495eaf1ed9f5e1616f1271bbca3c..f33088eaaad61bf764f87608b34cad272e2eed48 100644 (file)
@@ -158,7 +158,7 @@ accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
                    BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
        else {
                SSL *ssl = SSL_new(ssl_ctx);
-               b_out = bufferevent_openssl_socket_new(base, -1, ssl,
+               b_out = bufferevent_openssl_socket_new(base, -1, ssl,
                    BUFFEREVENT_SSL_CONNECTING,
                    BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
        }
index 4f83b774ee2bba7467d4c1fba4acaa0577334032..85679891898b669559f0f8d5b95b863254b1842a 100644 (file)
@@ -180,7 +180,7 @@ http_readcb(struct bufferevent *bev, void *arg)
 {
        const char *what = BASIC_REQUEST_BODY;
 
-       event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bufferevent_get_input(bev))));
+       event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bufferevent_get_input(bev))));
 
        if (evbuffer_find(bufferevent_get_input(bev),
                (const unsigned char*) what, strlen(what)) != NULL) {
@@ -301,11 +301,11 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
        memset(state, 0, sizeof(struct chunk_req_state));
        state->req = req;
 
-       if (strcmp(evhttp_request_uri(req), "/streamed") == 0) {
-               evhttp_add_header(req->output_headers, "Content-Length", "39");
-       }
+       if (strcmp(evhttp_request_uri(req), "/streamed") == 0) {
+               evhttp_add_header(req->output_headers, "Content-Length", "39");
+       }
 
-       /* generate a chunked/streamed reply */
+       /* generate a chunked/streamed reply */
        evhttp_send_reply_start(req, HTTP_OK, "Everything is fine");
 
        /* but trickle it across several iterations to ensure we're not
@@ -2445,7 +2445,7 @@ static void
 http_data_length_constraints_test_done(struct evhttp_request *req, void *arg)
 {
        tt_assert(req);
-       tt_int_op(req->response_code, ==, HTTP_BADREQUEST);
+       tt_int_op(req->response_code, ==, HTTP_BADREQUEST);
 end:
        event_loopexit(NULL);
 }
index c74b863b3de2a8657ac2993151d07f715b67e80a..b9c9f81901cf6620b0397ffe8a563e094deb5080 100644 (file)
@@ -590,7 +590,7 @@ static void
 rpc_hook_pause_cb(int fd, short what, void *arg)
 {
        struct _rpc_hook_ctx *ctx = arg;
-       ++hook_pause_cb_called;
+       ++hook_pause_cb_called;
        evrpc_resume_request(ctx->vbase, ctx->ctx, EVRPC_CONTINUE);
 }
 
index 24893684400ad160ea580b6b2ec6e8fa35d31487..decb00695f4cdfc921c320eea6f92cd022d663c3 100644 (file)
@@ -165,7 +165,7 @@ long _evutil_weakrand(void);
                        event_errx(_EVENT_ERR_ABORT,                    \
                            "%s:%d: Assertion %s failed in %s",         \
                            __FILE__,__LINE__,#cond,__func__);          \
-                       /* In case a user-supplied handler tries to */  \
+                       /* In case a user-supplied handler tries to */  \
                        /* return control to us, log and abort here. */ \
                        (void)fprintf(stderr,                           \
                            "%s:%d: Assertion %s failed in %s",         \