[LTP] [PATCH v8 2/4] Make checks for termio flags more strict

Petr Vorel pvorel@suse.cz
Thu Oct 26 00:31:21 CEST 2023


Hi Marius,

...
> -	if (!
> -	    (termio.c_lflag
> -	     && (ISIG | ICANON | XCASE | ECHO | ECHOE | NOFLSH))) {
> +	if (termio.c_lflag != (ISIG | ICANON | XCASE | ECHO | ECHOE
> +		 | NOFLSH)) {
Shouldn't this be using & ~() ?

	if ((termio.c_lflag & ~(ISIG | ICANON | XCASE | ECHO | ECHOE | NOFLSH))) {

Also the other two.

Kind regards,
Petr


More information about the ltp mailing list