From c29a3b7bd89c45d3781133679ae875e0e835bdd4 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 21 Apr 2022 08:05:36 +0800 Subject: [PATCH] pipe: Increase buffer size by one byte to ompensate the full indicator Signed-off-by: Xiang Xiao --- 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;