Skip to content
Browse files

Merge pull request #9 from jopu-enea/master

Fix build errors when assertions are enabled
  • Loading branch information...
2 parents 5d5b7a5 + b3654f7 commit 76c03e880477666b1e2275607dd62a74f02b6daf @avsm committed Aug 26, 2013
Showing with 5 additions and 7 deletions.
  1. +0 −2 Makefile
  2. +2 −2 pipe_thr.c
  3. +2 −2 tcp_thr.c
  4. +1 −1 vmsplice_pipe_thr.c
View
2 Makefile
@@ -10,8 +10,6 @@ ifeq ($(uname),Darwin)
all_target := darwin
endif
-CFLAGS = -g -Wall -O3 -D_GNU_SOURCE -DNDEBUG -std=gnu99
-
.PHONY: all clean run
CFLAGS_Linux = -DUSE_INLINE_ASM -DLinux
View
4 pipe_thr.c
@@ -81,7 +81,7 @@ static void
release_read_buf(test_data *td, struct iovec* vecs, int n_vecs) {
pipe_state *ps = (pipe_state *)td->data;
assert(n_vecs == 1);
- assert(vecs == ps->buffer);
+ assert(vecs == &ps->buffer);
}
static void child_fin(test_data *td) {
@@ -102,7 +102,7 @@ static void
release_write_buf(test_data *td, struct iovec* vecs, int n_vecs)
{
pipe_state *ps = (pipe_state *)td->data;
- assert(vecs == ps->buffer && n_vecs == 1);
+ assert(vecs == &ps->buffer && n_vecs == 1);
xwrite(ps->fds[1], vecs[0].iov_base, vecs[0].iov_len);
}
View
4 tcp_thr.c
@@ -127,7 +127,7 @@ static void
release_read_buf(test_data *td, struct iovec* vecs, int n_vecs) {
struct tcp_state *ps = (struct tcp_state *)td->data;
assert(n_vecs == 1);
- assert(vecs == ps->buffer);
+ assert(vecs == &ps->buffer);
}
static struct iovec* get_write_buf(test_data *td, int len, int* n_vecs) {
@@ -141,7 +141,7 @@ static void
release_write_buf(test_data *td, struct iovec* vecs, int n_vecs)
{
struct tcp_state *ps = (struct tcp_state *)td->data;
- assert(vecs == ps->buffer && n_vecs == 1);
+ assert(vecs == &ps->buffer && n_vecs == 1);
xwrite(ps->fd, vecs[0].iov_base, vecs[0].iov_len);
}
View
2 vmsplice_pipe_thr.c
@@ -207,7 +207,7 @@ static void release_write_buffer(test_data* td, struct iovec* vecs, int n_vecs)
pipe_state *ps = (pipe_state *)td->data;
assert(n_vecs == 1);
- assert(vecs == &td->iov);
+
#ifdef VMSPLICE_COOP
ps->bytes_written += td->size;
while(ps->bytes_written >= coop_reporting_chunk_size) {

0 comments on commit 76c03e8

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