[flashrom] [PATCH] CID1129998/1129999: Unchecked return value from library
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Wed May 28 00:15:22 CEST 2014
On Sat, 26 Apr 2014 13:28:51 +0200
Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at> wrote:
> On Tue, 19 Nov 2013 20:35:57 +0100
> Stefan Reinauer <stefan.reinauer at coreboot.org> wrote:
>
> > Index: serial.c
> > ===================================================================
> > --- serial.c (revision 1763)
> > +++ serial.c (working copy)
> > @@ -181,7 +181,10 @@
> > msg_pdbg("Baud rate is %ld.\n", dcb.BaudRate);
> > #else
> > struct termios wanted, observed;
> > - fcntl(fd, F_SETFL, 0);
> > + if (fcntl(fd, F_SETFL, 0) != 0) {
> > + msg_perr_strerror("Could not set serial port mode: ");
> > + return 1;
> > + }
> > if (tcgetattr(fd, &observed) != 0) {
> > msg_perr_strerror("Could not fetch original serial port configuration: ");
> > return 1;
>
> Why do we clear all file descriptor flags anyway? The code is from
> Urja, hence the CC.
Whatever the reason is, I have committed the patch (with minor
refinements) in r1803. I think that was the last bug fix originating in
coverity scans. Thanks again Stefan!
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list