Re: [EXTERNAL] [PATCH] Cygwin: ctty: Replace ctty constant with more descriptive macros.

2023-03-06 Thread Takashi Yano
On Tue, 7 Mar 2023 02:42:49 + "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_V

[PATCH] Cygwin: ctty: Replace ctty constant with more descriptive macros.

2023-03-06 Thread Takashi Yano
This patch replaces ctty constants with more descriptive macros (CTTY_UNINITIALIZED and CTTY_RELEASED) rather than -1 and -2 as well as checking sign with CTTY_IS_VALID(). Fixes: 3b7df69aaa57 (Cygwin: ctty: Add comments for the special values: -1 and -2.) Suggested-by: Corinna Vinschen Signed-of