Hi! > > Ok, this was wrong because with len_strict == 1 and rval == -1 we will > > cast -1 to (size_t) which will yield 2^64 - 1. In practice this was > > working fine since nobody would call write with such large buffer... > > > > Newertless it's better as it is now, but commit message could have been > > better since as far as I can see the len_strict flag was working fine. > > > > Because when len_strict == 1 the result was computed as: > > > > if ((0 && whatever) || rval != nbyte) -> if (0 || rval != nbyte) -> if (rval > > != nbyte) > > > > which worked fine for all practical purposes. Or am I missing something? > > Also, when len_strict == 0 and less bytes were written than requested, > it would report TBROK. With len_strict == 0 it should TBROK only when > rval is -1.
Ah, that is what I missed. The commit message should said that the lengh was checked in all cases... -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list