Skip to content
Browse files

Merge pull request #7 from Cofyc/trailing_spaces

remove trailing spaces for diff
  • Loading branch information...
2 parents a30fb7e + df23304 commit 163c04c75b68b10444c328454488efef7e51ace9 @cloudwu committed
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);

0 comments on commit 163c04c

Please sign in to comment.
Something went wrong with that request. Please try again.