Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

remove trailing spaces for diff #7

Merged
merged 1 commit into from

2 participants

@Cofyc

移除行尾 spaces,避免影响 diff

@cloudwu cloudwu merged commit 163c04c into cloudwu:master
@Cofyc Cofyc deleted the Cofyc:trailing_spaces branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 27, 2012
  1. @Cofyc

    remove trailing spaces for diff

    Cofyc authored
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +7 −7 mread.c
  2. +1 −1  mread.h
View
14 mread.c
@@ -220,7 +220,7 @@ mread_close(struct mread_pool *self) {
close(self->listen_fd);
}
#ifdef HAVE_EPOLL
- close(self->epoll_fd);
+ close(self->epoll_fd);
#elif HAVE_KQUEUE
close(self->kqueue_fd);
#endif
@@ -295,7 +295,7 @@ _add_client(struct mread_pool * self, int fd) {
if (kevent(self->kqueue_fd, &ke, 1, NULL, 0, NULL) == -1) {
close(fd);
return;
- }
+ }
#endif
s->fd = fd;
@@ -366,7 +366,7 @@ mread_socket(struct mread_pool * self, int index) {
static void
_link_node(struct ringbuffer * rb, int id, struct socket * s , struct ringbuffer_block * blk) {
if (s->node) {
- ringbuffer_link(rb, s->node , blk);
+ ringbuffer_link(rb, s->node , blk);
} else {
blk->id = id;
s->node = blk;
@@ -415,7 +415,7 @@ _ringbuffer_read(struct mread_pool * self, int *size) {
return ret;
}
-void *
+void *
mread_pull(struct mread_pool * self , int size) {
if (self->active == -1) {
return NULL;
@@ -460,7 +460,7 @@ mread_pull(struct mread_pool * self , int size) {
buffer = (char *)(blk + 1);
for (;;) {
- int bytes = recv(s->fd, buffer, rd, MSG_DONTWAIT);
+ int bytes = recv(s->fd, buffer, rd, MSG_DONTWAIT);
if (bytes > 0) {
ringbuffer_shrink(rb, blk , bytes);
if (bytes < sz) {
@@ -520,7 +520,7 @@ mread_pull(struct mread_pool * self , int size) {
return ret;
}
-void
+void
mread_yield(struct mread_pool * self) {
if (self->active == -1) {
return;
@@ -546,7 +546,7 @@ mread_yield(struct mread_pool * self) {
}
}
-int
+int
mread_closed(struct mread_pool * self) {
if (self->active == -1) {
return 0;
View
2  mread.h
@@ -2,7 +2,7 @@
#define MREAD_H
struct mread_pool;
-
+
struct mread_pool * mread_create(int port , int max , int buffer);
void mread_close(struct mread_pool *m);
Something went wrong with that request. Please try again.