[asterisk-commits] mnicholson: branch 1.8 r344048 - /branches/1.8/formats/format_wav.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 9 09:25:36 CST 2011
Author: mnicholson
Date: Wed Nov 9 09:25:33 2011
New Revision: 344048
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344048
Log:
don't call ltohl() twice on the same value
ASTERISK-18739
Patch by: pawel (modified)
Modified:
branches/1.8/formats/format_wav.c
Modified: branches/1.8/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_wav.c?view=diff&rev=344048&r1=344047&r2=344048
==============================================================================
--- branches/1.8/formats/format_wav.c (original)
+++ branches/1.8/formats/format_wav.c Wed Nov 9 09:25:33 2011
@@ -81,7 +81,7 @@
int bysec;
int freq;
if (hsize < 16) {
- ast_log(LOG_WARNING, "Unexpected header size %d\n", ltohl(hsize));
+ ast_log(LOG_WARNING, "Unexpected header size %d\n", hsize);
return -1;
}
if (fread(&format, 1, 2, f) != 2) {
@@ -129,8 +129,8 @@
return -1;
}
/* Skip any additional header */
- if (fseek(f,ltohl(hsize)-16,SEEK_CUR) == -1 ) {
- ast_log(LOG_WARNING, "Failed to skip remaining header bytes: %d\n", ltohl(hsize)-16 );
+ if (fseek(f,hsize-16,SEEK_CUR) == -1 ) {
+ ast_log(LOG_WARNING, "Failed to skip remaining header bytes: %d\n", hsize-16 );
return -1;
}
return 0;
More information about the asterisk-commits
mailing list