On 12/5/06, Francesco Romani <[EMAIL PROTECTED]> wrote:
That makes think that we're talking about 1.0.x branch, am I right?
oh, right. I noticed that some CVS modules used fwrite, but not that
you switched to tc_pwrite.
Ok, but there's a bug in tc_pwrite, or in the way it's being used.
The return value of tc_pwrite is the number of bytes written. It is
never less than that; there is no special case to return a negative
number if an error other than EINTR is encountered.
However, some modules (like decode_mp3) check if the return value is
negative, which is never is. Some modules do the right thing (like
extract_dv, extract_pcm), and some do a mixture (like extract_ac3).
Of course some don't bother checking it at all (parts of extract_ac3
-- who wrote that?, decode_mov, etc)
So, uh, which way should I go? Change tc_pwrite to return negative on
error, or change users to check if result != num bytes requested?
--
Scott