From 6f856c62613ffc82bf3572a372d2851638c2fb90 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 28 Jun 2014 11:41:21 +0200 Subject: 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. --- libpipe/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpipe') 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) -- cgit v1.2.3