]> granicus.if.org Git - libevent/commitdiff
Stop using C++ style comments.
authorNick Mathewson <nickm@torproject.org>
Tue, 14 Jul 2009 18:50:06 +0000 (18:50 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 14 Jul 2009 18:50:06 +0000 (18:50 +0000)
svn:r1343

event.c
evutil.c
sample/event-test.c
test/regress_buffer.c
test/regress_http.c
test/regress_main.c
test/tinytest.c

diff --git a/event.c b/event.c
index aaee1185a8fbb631e447c370f8179c2411ae9cea..f8bc58016948e9d4ee0b3030a8c3186e86443c1e 100644 (file)
--- a/event.c
+++ b/event.c
@@ -1773,9 +1773,11 @@ evthread_make_base_notifiable(struct event_base *base)
 
        base->th_notify_fn = notify;
 
-       // This can't be right, can it?  We want writes to this socket to
-       // just succeed.
-       // evutil_make_socket_nonblocking(base->th_notify_fd[1]);
+       /*
+         This can't be right, can it?  We want writes to this socket to
+         just succeed.
+         evutil_make_socket_nonblocking(base->th_notify_fd[1]);
+       */
 
        /* prepare an event that we can use for wakeup */
        event_assign(&base->th_notify, base, base->th_notify_fd[0],
index 5f8f9b9aee219376fb3f779c8b4022849f84cd26..39495ec1162d22aa90cc4e81386bde3b5e53a5f3 100644 (file)
--- a/evutil.c
+++ b/evutil.c
@@ -561,7 +561,7 @@ evutil_inet_pton(int af, const char *src, void *dst)
                if (gapPos >= 0) {
                        int nToMove = setWords - (dot ? 2 : 0) - gapPos;
                        int gapLen = 8 - setWords;
-                       // assert(nToMove >= 0);
+                       /* assert(nToMove >= 0); */
                        if (nToMove < 0)
                                return -1; /* should be impossible */
                        memmove(&words[gapPos+gapLen], &words[gapPos],
index f86cb62e2d147464a83c3168f233c937ddc087bf..848cbc879cd9bfdcf2eb740f4bfec59d5d1ca622 100644 (file)
@@ -42,7 +42,7 @@ fifo_read(int fd, short event, void *arg)
 #ifdef WIN32
        len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL);
 
-       // Check for end of file.
+       /* Check for end of file. */
        if(len && dwBytesRead == 0) {
                fprintf(stderr, "End Of File");
                event_del(ev);
@@ -72,14 +72,14 @@ main (int argc, char **argv)
        struct event evfifo;
 #ifdef WIN32
        HANDLE socket;
-       // Open a file.
-       socket = CreateFile("test.txt",     // open File
-                       GENERIC_READ,                 // open for reading
-                       0,                            // do not share
-                       NULL,                         // no security
-                       OPEN_EXISTING,                // existing file only
-                       FILE_ATTRIBUTE_NORMAL,        // normal file
-                       NULL);                        // no attr. template
+       /* Open a file. */
+       socket = CreateFile("test.txt",               /* open File */
+                       GENERIC_READ,                 /* open for reading */
+                       0,                            /* do not share */
+                       NULL,                         /* no security */
+                       OPEN_EXISTING,                /* existing file only */
+                       FILE_ATTRIBUTE_NORMAL,        /* normal file */
+                       NULL);                        /* no attr. template */
 
        if(socket == INVALID_HANDLE_VALUE)
                return 1;
index 3bddacda458690f19b3606cb336d0c83446fa67e..1d69829021682ac74ba8b60fb33f9e632c145242 100644 (file)
@@ -1135,7 +1135,7 @@ test_evbuffer_freeze(void *ptr)
        FREEZE_EQ(r, 0, -1);
        r = evbuffer_add_printf(buf, "Hello %s", "world");
        FREEZE_EQ(r, 11, -1);
-       // TODO: test add_buffer, add_file, read
+       /* TODO: test add_buffer, add_file, read */
 
        if (!start)
                tt_int_op(orig_length, ==, evbuffer_get_length(buf));
@@ -1153,7 +1153,7 @@ test_evbuffer_freeze(void *ptr)
        FREEZE_EQ(cp==NULL, 1, 0);
        if (cp)
                free(cp);
-       // TODO: Test remove_buffer, add_buffer, write, prepend_buffer
+       /* TODO: Test remove_buffer, add_buffer, write, prepend_buffer */
 
        if (start)
                tt_int_op(orig_length, ==, evbuffer_get_length(buf));
index a53b5cc2aaac432c37d0f1222c9cb45081ed838c..daa03e94218072a284b1949ee25d585d5cdefc6e 100644 (file)
@@ -1112,7 +1112,7 @@ http_put_cb(struct evhttp_request *req, void *arg)
        if (EVBUFFER_LENGTH(req->input_buffer) != strlen(PUT_DATA)) {
                fprintf(stdout, "FAILED (length: %zu vs %zu)\n",
                    EVBUFFER_LENGTH(req->input_buffer), strlen(PUT_DATA));
-               //exit(1);
+               exit(1);
        }
 
        if (memcmp(EVBUFFER_DATA(req->input_buffer), PUT_DATA,
index 1512f76809acea33446397196a2edcb68999ff7c..4ce699b2a7bca1c1abec148f063afa3290c46da6 100644 (file)
@@ -150,7 +150,7 @@ basic_test_setup(const struct testcase_t *testcase)
         if (testcase->flags & TT_NEED_DNS) {
                 evdns_set_log_fn(dnslogcb);
                 if (evdns_init())
-                        return NULL; /* fast failure *//*XXX asserts. */
+                        return NULL; /* fast failure */ /*XXX asserts. */
         }
 
        data = calloc(1, sizeof(*data));
index 07483b8c837b6812b02bf877a0de96b26a99736e..3654e681d2d520e88677ec30f54fd03b2e14d0bd 100644 (file)
@@ -102,7 +102,6 @@ _testcase_run_forked(const struct testgroup_t *group,
         */
        int ok;
        char buffer[LONGEST_TEST_NAME+256];
-       //const char *verbosity;
        STARTUPINFO si;
        PROCESS_INFORMATION info;
        DWORD exitcode;