[asterisk-commits] mnicholson: trunk r344050 - in /trunk: ./	formats/format_wav.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Wed Nov  9 09:28:36 CST 2011
    
    
  
Author: mnicholson
Date: Wed Nov  9 09:28:33 2011
New Revision: 344050
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344050
Log:
don't call ltohl() twice on the same value
ASTERISK-18739
Patch by: pawel (modified)
........
Merged revisions 344048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 344049 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
    trunk/   (props changed)
    trunk/formats/format_wav.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_wav.c?view=diff&rev=344050&r1=344049&r2=344050
==============================================================================
--- trunk/formats/format_wav.c (original)
+++ trunk/formats/format_wav.c Wed Nov  9 09:28: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