On Tue, Sep 16, 2014 at 11:27 PM,  <philippedesw...@gmail.com> wrote:
> From: Philippe De Swert <philippedesw...@gmail.com>
>
> We only break out of the pre-ceding loop into the rest of the code
> if fd is actually >= 0. So the < 0 check will never be true and
> not necessary.
>
> Found with Coverity. Fixes: CID#1237577

I pushed a fix for this one 20 minutes ago. (I also set the CID as
assigned to me but maybe we need a better way to coordinate?)

> ---
>  src/shared/util.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/src/shared/util.c b/src/shared/util.c
> index 61d6680..30b0364 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -1878,9 +1878,6 @@ int open_terminal(const char *name, int mode) {
>                  c++;
>          }
>
> -        if (fd < 0)
> -                return -errno;
> -
>          r = isatty(fd);
>          if (r < 0) {
>                  safe_close(fd);
> --
> 1.8.3.2
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to