[asterisk-commits] kmoore: branch 1.8 r351860 - /branches/1.8/codecs/ilbc/iLBC_test.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 20 13:34:23 CST 2012


Author: kmoore
Date: Fri Jan 20 13:34:20 2012
New Revision: 351860

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351860
Log:
More corrections for the ilbc code

These changes are in a file that is not compiled by default, and so were
missed on earlier checks.

Modified:
    branches/1.8/codecs/ilbc/iLBC_test.c

Modified: branches/1.8/codecs/ilbc/iLBC_test.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/codecs/ilbc/iLBC_test.c?view=diff&rev=351860&r1=351859&r2=351860
==============================================================================
--- branches/1.8/codecs/ilbc/iLBC_test.c (original)
+++ branches/1.8/codecs/ilbc/iLBC_test.c Fri Jan 20 13:34:20 2012
@@ -248,7 +248,9 @@
 
            /* write byte file */
 
-           fwrite(encoded_data, sizeof(unsigned char), len, efileid);
+           if (fwrite(encoded_data, sizeof(unsigned char), len, efileid) != len) {
+               fprintf(stderr, "Failure in fwritef\n");
+           }
 
            /* get channel data if provided */
            if (argc==6) {
@@ -280,7 +282,9 @@
 
            /* write output file */
 
-           fwrite(decoded_data,sizeof(short),len,ofileid);
+           if (fwrite(decoded_data,sizeof(short),len,ofileid) != len) {
+               fprintf(stderr, "Failure in fwritef\n");
+           }
        }
 
        /* Runtime statistics */




More information about the asterisk-commits mailing list