[asterisk-commits] trunk - r7806 in /trunk: ./ formats/format_pcm.c
formats/format_pcm_alaw.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 4 17:51:24 CST 2006
Author: kpfleming
Date: Wed Jan 4 17:51:23 2006
New Revision: 7806
URL: http://svn.digium.com/view/asterisk?rev=7806&view=rev
Log:
Merged revisions 7805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7805 | kpfleming | 2006-01-04 17:51:03 -0600 (Wed, 04 Jan 2006) | 2 lines
use proper fwrite() parameters and return value
........
Modified:
trunk/ (props changed)
trunk/formats/format_pcm.c
trunk/formats/format_pcm_alaw.c
Propchange: trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 4 17:51:23 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7803
+/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7805
Modified: trunk/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm.c?rev=7806&r1=7805&r2=7806&view=diff
==============================================================================
--- trunk/formats/format_pcm.c (original)
+++ trunk/formats/format_pcm.c Wed Jan 4 17:51:23 2006
@@ -201,11 +201,11 @@
size_t res;
while (left) {
- res = fwrite(ulaw_silence, (left > BUF_SIZE) ? BUF_SIZE : left,
- sizeof(ulaw_silence[0]), fs->f);
+ res = fwrite(ulaw_silence, sizeof(ulaw_silence[0]),
+ (left > BUF_SIZE) ? BUF_SIZE : left, fs->f);
if (res == -1)
return res;
- left -= res;
+ left -= res * sizeof(ulaw_silence[0]);
}
return offset;
}
Modified: trunk/formats/format_pcm_alaw.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm_alaw.c?rev=7806&r1=7805&r2=7806&view=diff
==============================================================================
--- trunk/formats/format_pcm_alaw.c (original)
+++ trunk/formats/format_pcm_alaw.c Wed Jan 4 17:51:23 2006
@@ -276,11 +276,11 @@
size_t res;
while (left) {
- res = fwrite(alaw_silence, (left > BUF_SIZE) ? BUF_SIZE : left,
- sizeof(alaw_silence[0]), fs->f);
+ res = fwrite(alaw_silence, sizeof(alaw_silence[0]),
+ (left > BUF_SIZE) ? BUF_SIZE : left, fs->f);
if (res == -1)
return res;
- left -= res;
+ left -= res * sizeof(alaw_silence[0]);
}
return offset;
}
More information about the asterisk-commits
mailing list