summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-06-28 11:41:21 +0200
committerRichard Braun <rbraun@sceen.net>2014-06-28 11:41:21 +0200
commit6f856c62613ffc82bf3572a372d2851638c2fb90 (patch)
treef0d41bde3eb7218cbefa19487ca15e2cab53a4fd
parent840ffcb30faf335dbec4a0f02614c202ae113ea2 (diff)
libpipe: fix calls to pipe_send with no data
* libpipe/pipe.c (pipe_send): Check that there actually is any data to send before calling the pipe write operation.
-rw-r--r--libpipe/pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpipe/pipe.c b/libpipe/pipe.c
index f9300e7c..56c339dd 100644
--- a/libpipe/pipe.c
+++ b/libpipe/pipe.c
@@ -358,7 +358,7 @@ pipe_send (struct pipe *pipe, int noblock, void *source,
}
}
- if (!err)
+ if (!err && data_len > 0)
err = (*pipe->class->write)(pipe->queue, source, data, data_len, amount);
if (!err)