[svn-commits] mnicholson: branch 10 r344049 - in /branches/10: ./ formats/format_wav.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 9 09:26:53 CST 2011


Author: mnicholson
Date: Wed Nov  9 09:26:50 2011
New Revision: 344049

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344049
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

Modified:
    branches/10/   (props changed)
    branches/10/formats/format_wav.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_wav.c?view=diff&rev=344049&r1=344048&r2=344049
==============================================================================
--- branches/10/formats/format_wav.c (original)
+++ branches/10/formats/format_wav.c Wed Nov  9 09:26:50 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 svn-commits mailing list