Date: Thu, 31 Jan 2013 15:01:39 -0500 From: John Baldwin <jhb@freebsd.org> To: Pietro Cerutti <gahr@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r246120 - in head: include lib/libc/stdio tools/regression/lib/libc/stdio Message-ID: <201301311501.39671.jhb@freebsd.org> In-Reply-To: <201301311123.09015.jhb@freebsd.org> References: <201301301459.r0UExQKw074249@svn.freebsd.org> <201301311123.09015.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, January 31, 2013 11:23:08 am John Baldwin wrote:
> On Wednesday, January 30, 2013 9:59:26 am Pietro Cerutti wrote:
> > +static fpos_t
> > +fmemopen_seek (void *cookie, fpos_t offset, int whence)
> > +{
> > + struct __fmemopen_cookie *ck = cookie;
> > +
> > +
> > + switch (whence) {
> > + case SEEK_SET:
> > + if (offset > ck->len) {
> > + errno = EINVAL;
> > + return (-1);
>
> This should return POS_ERR on failure.
I'm wrong on this one. POS_ERR is internal to fseek.c and the funopen()
manpage is clear that -1 should be returned in this case.
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301311501.39671.jhb>
