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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to