Re: [PATCH] cpukit/libfs: remove more dead code from pipe/fifo.c

2020-01-03 Thread Joel Sherrill
Looks good to me.

FWIW the one in untar may have to be annotated as ok in the code. They
legitimately see a potential race condition but we should document that
untar should be allowed to run with no interference.

On Fri, Jan 3, 2020, 12:56 PM Gedare Bloom  wrote:

> Dead code identified by Coverity (CID 1456674). The value of ret
> at line 358 is always 0.
> ---
>  cpukit/libfs/src/pipe/fifo.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
> index 579f118bfd..0a3cbf3d65 100644
> --- a/cpukit/libfs/src/pipe/fifo.c
> +++ b/cpukit/libfs/src/pipe/fifo.c
> @@ -355,8 +355,6 @@ ssize_t pipe_write(
>pipe->waitingWriters ++;
>PIPE_WRITEWAIT(pipe);
>pipe->waitingWriters --;
> -  if (ret != 0)
> -goto out_locked;
>
>if (pipe->Readers == 0) {
>  ret = -EPIPE;
> --
> 2.17.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] cpukit/libfs: remove more dead code from pipe/fifo.c

2020-01-03 Thread Gedare Bloom
Dead code identified by Coverity (CID 1456674). The value of ret
at line 358 is always 0.
---
 cpukit/libfs/src/pipe/fifo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
index 579f118bfd..0a3cbf3d65 100644
--- a/cpukit/libfs/src/pipe/fifo.c
+++ b/cpukit/libfs/src/pipe/fifo.c
@@ -355,8 +355,6 @@ ssize_t pipe_write(
   pipe->waitingWriters ++;
   PIPE_WRITEWAIT(pipe);
   pipe->waitingWriters --;
-  if (ret != 0)
-goto out_locked;
 
   if (pipe->Readers == 0) {
 ret = -EPIPE;
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel