Quote Originally Posted by Codeplug View Post
How do you know that fwrite fails? Can we see the code?

gg
Boy, it's just what i've posted:
If fwrite succeed errno remains 0 and perror outputs "No error",
otherwise errno!=0 and perror output something meaningful.