From d4bc1800ca003baae7d992f2a7dc4e280ff15949 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Thu, 15 May 2008 16:13:13 +0000 Subject: [PATCH] be a bit more verbouse if fread fails git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@966 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/plug-in/wav/wav_hdr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/plug-in/wav/wav_hdr.c b/core/plug-in/wav/wav_hdr.c index 89fbe01c..f56893a8 100644 --- a/core/plug-in/wav/wav_hdr.c +++ b/core/plug-in/wav/wav_hdr.c @@ -58,7 +58,11 @@ #define SAFE_READ(buf,s,fp,sr) \ sr = fread(buf,s,1,fp);\ - if((sr != 1) || ferror(fp)) return -1; + if((sr != 1) || ferror(fp)) { \ + ERROR("fread: %s (sr=%d)\n", strerror(errno), sr); \ + return -1; \ + } +\ /** \brief The file header of RIFF-WAVE files (*.wav). * Files are always in