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: [PATCH] Add fseek to ui-file


On 12/07/2012 08:01 AM, Hui Zhu wrote:
> +ui_file_fseek (struct ui_file * file, long offset, int whence)

No space after '*'.  Several instances of this issue in the patch.

On 12/07/2012 08:01 AM, Hui Zhu wrote:
> +static void
> +stdio_file_fseek (struct ui_file * file, long offset, int whence)
> +{
...
> +  if (fseek (stdio->file, offset, whence))
> +    error (_("fseek fail: %s"), safe_strerror (errno));

I think that if we want to support error handling, then this should
return the fseek result to the caller instead of throwing an exception.
See e.g., the comment in stdio_file_write.

-- 
Pedro Alves


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