[svn-commits] seanbright: tools/trunk r6887 - /tools/trunk/dahdi_monitor.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jul 23 12:43:04 CDT 2009
Author: seanbright
Date: Thu Jul 23 12:43:00 2009
New Revision: 6887
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6887
Log:
Pay attention to the return value of fwrite() to silence a compiler warning.
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=6887&r1=6886&r2=6887
==============================================================================
--- tools/trunk/dahdi_monitor.c (original)
+++ tools/trunk/dahdi_monitor.c Thu Jul 23 12:43:00 2009
@@ -764,7 +764,9 @@
wavheaders[i].data_data_size = bytes_written[i];
rewind(ofh[i]);
- fwrite(&wavheaders[i], 1, sizeof(struct wavheader), ofh[i]);
+ if (fwrite(&wavheaders[i], 1, sizeof(struct wavheader), ofh[i]) != sizeof(struct wavheader)) {
+ fprintf(stderr, "Failed to write out a full wav header.\n");
+ }
fclose(ofh[i]);
}
printf("done cleaning up ... exiting.\n");
More information about the svn-commits
mailing list