This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [OB] Fix build error in ui-file.c


> Fix it like others in this file.
> 
> 2011-05-14  Hui Zhu  <teawater@gmail.com>
> 
> 	* ui-file.c (stdio_file_write_async_safe): Add empty check for build.

Personally, I think we're just sweeping the problem under the rug.
I'd rather have something like this:

> -  write (stdio->fd, buf, length_buf);
> +  if (write (stdio->fd, buf, length_buf))
> +    ;

    if (write (stdio->fd, buf, length_buf) < 0)
      /* Ignore this error *because*... */; 

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]