]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
More corrections for the ilbc code
authorKinsey Moore <kmoore@digium.com>
Fri, 20 Jan 2012 19:35:11 +0000 (19:35 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 20 Jan 2012 19:35:11 +0000 (19:35 +0000)
These changes are in a file that is not compiled by default, and so were
missed on earlier checks.
........

Merged revisions 351860 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@351861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/ilbc/iLBC_test.c

index 473cc7b68ae885e24029f65e145078d990166a51..92d6c0ddc76c1d90dcebabda5b76826e4790f537 100644 (file)
 
            /* 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) {
 
            /* 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 */