summaryrefslogtreecommitdiff
path: root/formats
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-11-09 15:28:33 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-11-09 15:28:33 +0000
commit5203e0f552624936bbf5ac893c8de888f40ede5d (patch)
treea30eae732c1e5d21b7e7ec17f5c14ef3351d4b80 /formats
parent9537f22c54a244a6f697f542b218902599f7ae83 (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'formats')
-rw-r--r--formats/format_wav.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 956b13e30..78b3a7fa1 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -81,7 +81,7 @@ static int check_header_fmt(FILE *f, int hsize, int hz)
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 @@ static int check_header_fmt(FILE *f, int hsize, int hz)
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;