[svn-commits] russell: tools/trunk r6834 - /tools/trunk/dahdi_monitor.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 8 12:12:25 CDT 2009
Author: russell
Date: Wed Jul 8 12:12:21 2009
New Revision: 6834
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6834
Log:
Resolve a compiler warning in dahdi_monitor.
Modified:
tools/trunk/dahdi_monitor.c
Modified: tools/trunk/dahdi_monitor.c
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/dahdi_monitor.c?view=diff&rev=6834&r1=6833&r2=6834
==============================================================================
--- tools/trunk/dahdi_monitor.c (original)
+++ tools/trunk/dahdi_monitor.c Wed Jul 8 12:12:21 2009
@@ -755,7 +755,10 @@
continue;
rewind(ofh[i]);
- fread(&wavheaders[i], 1, sizeof(struct wavheader), ofh[i]);
+
+ if (fread(&wavheaders[i], 1, sizeof(struct wavheader), ofh[i]) != sizeof(struct wavheader)) {
+ fprintf(stderr, "Failed to read in a full wav header. Expect bad things.\n");
+ }
wavheaders[i].riff_chunk_size = (bytes_written[i]) + sizeof(struct wavheader) - 8; /* filesize - 8 */
wavheaders[i].data_data_size = bytes_written[i];
More information about the svn-commits
mailing list