screen-devel
[Top][All Lists]
Advanced

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

Re: [screen-devel] [PATCH (master)] screen: do not stat("")


From: Amadeusz Sławiński
Subject: Re: [screen-devel] [PATCH (master)] screen: do not stat("")
Date: Tue, 30 May 2017 22:22:30 +0200

On Wed, 10 May 2017 16:43:38 +0200
Christian Brauner <address@hidden> wrote:

> Signed-off-by: Christian Brauner <address@hidden>
> ---
>  src/screen.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/screen.c b/src/screen.c
> index c741eb4..117b8a0 100644
> --- a/src/screen.c
> +++ b/src/screen.c
> @@ -38,6 +38,7 @@
>  #include <signal.h>
>  #include <stdint.h>
>  #include <stdbool.h>
> +#include <string.h>
>  #include <unistd.h>
>  #include <sys/ioctl.h>
>  #include <sys/stat.h>
> @@ -1818,7 +1819,7 @@ void SetTtyname(bool fatal, struct stat *st)
>               }
>       }
>  
> -     if (attach_tty) {
> +     if (attach_tty && strcmp(attach_tty, "")) {
>               if (stat(attach_tty, st))
>                       Panic(errno, "Cannot access '%s'", attach_tty);
>  

Hey,

Thanks for patch, applied to both screen-v4 and master.

Amadeusz



reply via email to

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