A method with return type size_t returns negative value

Jing LV lvjing at linux.vnet.ibm.com
Wed Mar 23 09:20:54 UTC 2011


Hello,

I found a problem in windows/native/java/io/io_util_md.c, method
handleRead(). The return type of the method is size_t, which is defined
as unsigned int. However we see the method would return negative values
while it meets some error. This may be a problem as the API comsumer and
later developer may have misunderstand it. I suggest modify it to
ssize_t (or SSIZE_T as it is on windows).
Any comments?

-- 
Best Regards,
Jimmy, Jing LV




More information about the core-libs-dev mailing list