WUtil: fixed possible problem in wcopy_file (Coverity #50141)
commit8f9b843990a15c5aaab0e504978a13addccc6564
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 17 May 2014 22:56:40 +0000 (18 00:56 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 18 May 2014 22:00:16 +0000 (18 23:00 +0100)
tree94b1e4b380b4482363de09655e328f487a35b038
parent5255c364b8404a05916069c584cb94d06b8e52a5
WUtil: fixed possible problem in wcopy_file (Coverity #50141)

As pointed by Coverity, the macro RETRY does not behave as expected, as it
assumes that errno is cleared on successful 'fopen' call which is not the
case.

This patch removes the uses of the macro RETRY:
 - fopen: with the appropriate check
 - fread/fwrite: nothing because they do not set errno
 - fclose: nothing because retrying is not recommended

and took the opportunity to add a little bit more information in the error
messages.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs/findfile.c