mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Stop using C++ style comments.
svn:r1343
This commit is contained in:
parent
e224321c64
commit
043515bc52
8
event.c
8
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],
|
||||
|
2
evutil.c
2
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],
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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,
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user