[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin-patches
Subject:    Re: [EXTERNAL] [PATCH] Cygwin: ctty: Replace ctty constant with more descriptive macros.
From:       Takashi Yano <takashi.yano () nifty ! ne ! jp>
Date:       2023-03-07 3:30:06
Message-ID: 20230307123006.17e133d2bc274354f965badb () nifty ! ne ! jp
[Download RAW message or body]

On Tue, 7 Mar 2023 02:42:49 +0000
"Lavrentiev, Anton (NIH/NLM/NCBI) [C]" wrote:

> Can't help but notice that these two lines are not exactly logically equivalent:
>  format_process_ctty (void *data, char *&destbuf)
>  {
>    _pinfo *p = (_pinfo *) data;
> -  if (p->ctty < 0)
> +  if (!CTTY_IS_VALID (p->ctty))
> 
> And here as well:
> 
> {
>    if (str == NULL)
>      str = _my_tls.locals.ttybuf;
> -  if (myself->ctty < 0)
> +  if (!CTTY_IS_VALID (myself->ctty))

Thanks.
You are right, however, ctty value 0 is never used, so no problem I think.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic