On 21/06/2012 14:55, Sergey Kandaurov wrote:
On 21 June 2012 16:38, David Demelier<demelier.da...@gmail.com> wrote:
Hello,
While reading the manpage of mbstowcs I noticed an error in the RETURN
VALUES :
The mbstowcs() function returns the number of wide characters converted,
not counting any terminating null wide character, or -1 if an invalid
multibyte character was encountered.
Since size_t is unsigned, it can't returns -1.
It returns (size_t)(-1).
I don't know how is it correct, but this conforms to C spec.
Mm, if I understand well, since it is cast to size_t, I think the return
value will be SIZE_MAX - 1 then, right?
--
David Demelier
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"