You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/04/21 09:45:41 UTC

[incubator-nuttx] branch master updated: pipe: Increase buffer size by one byte to ompensate the full indicator

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new c29a3b7bd8 pipe: Increase buffer size by one byte to ompensate the full indicator
c29a3b7bd8 is described below

commit c29a3b7bd89c45d3781133679ae875e0e835bdd4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Apr 21 08:05:36 2022 +0800

    pipe: Increase buffer size by one byte to ompensate the full indicator
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/pipes/pipe_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c
index e6c051ab22..9974dc3723 100644
--- a/drivers/pipes/pipe_common.c
+++ b/drivers/pipes/pipe_common.c
@@ -144,7 +144,7 @@ FAR struct pipe_dev_s *pipecommon_allocdev(size_t bufsize)
       nxsem_set_protocol(&dev->d_rdsem, SEM_PRIO_NONE);
       nxsem_set_protocol(&dev->d_wrsem, SEM_PRIO_NONE);
 
-      dev->d_bufsize = bufsize;
+      dev->d_bufsize = bufsize + 1; /* +1 to compensate the full indicator */
     }
 
   return dev;