[PATCH] Add fseek to ui-file

Pedro Alves palves@redhat.com
Fri Dec 7 09:56:00 GMT 2012


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



More information about the Gdb-patches mailing list