commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 44/87: libpipe: fix calls to pipe_send with no data


From: Samuel Thibault
Subject: [hurd] 44/87: libpipe: fix calls to pipe_send with no data
Date: Sun, 09 Nov 2014 11:05:02 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 6f856c62613ffc82bf3572a372d2851638c2fb90
Author: Richard Braun <address@hidden>
Date:   Sat Jun 28 11:41:21 2014 +0200

    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(-)

diff --git a/libpipe/pipe.c b/libpipe/pipe.c
index f9300e7..56c339d 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)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]