References: <20210328085248.GB976@...1296...> From: Antonio Quartulli Message-ID: Date: Sun, 28 Mar 2021 11:55:20 +0200 MIME-Version: 1.0 In-Reply-To: <20210328085248.GB976@...1296...> Content-Language: en-US Subject: Re: [Openvpn-devel] [PATCH] Stop using deprecated getpass() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: Gert Doering Cc: =?UTF-8?Q?T=c3=b5ivo_Leedj=c3=a4rv?= , openvpn-devel@lists.sourceforge.net Hi, On 28/03/2021 10:52, Gert Doering wrote: > [..] >>> + { >>> + (void) tcsetattr(fileno(fp), TCSAFLUSH, &tty_save); >> >> We should not need to cast to void - I don't think we have warnings set >> for non-checked return values. > > Actually we should catch errors here and log them. If tcsetattr() fails, > the tty will be in a messed-up state - so we want to know that it happened, > and possibly also the "why". True. I totally agree here. Cheers, -- Antonio Quartulli