Skip to content

Commit

Permalink
remove trailing spaces for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
cofyc committed Nov 27, 2012
1 parent a30fb7e commit df23304
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions mread.c
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -546,7 +546,7 @@ mread_yield(struct mread_pool * self) {
}
}

int
int
mread_closed(struct mread_pool * self) {
if (self->active == -1) {
return 0;
Expand Down
2 changes: 1 addition & 1 deletion mread.h
Expand Up @@ -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);

Expand Down

0 comments on commit df23304

Please sign in to comment.