[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase1_step3 r303905 - /team/dvossel/fixt...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 25 14:48:25 CST 2011


Author: dvossel
Date: Tue Jan 25 14:48:22 2011
New Revision: 303905

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=303905
Log:
Fixes issue in translate.c found during code review

Modified:
    team/dvossel/fixtheworld_phase1_step3/main/translate.c

Modified: team/dvossel/fixtheworld_phase1_step3/main/translate.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/main/translate.c?view=diff&rev=303905&r1=303904&r2=303905
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/main/translate.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/main/translate.c Tue Jan 25 14:48:22 2011
@@ -1158,8 +1158,8 @@
 	struct ast_format *dst_fmt_out,
 	struct ast_format *src_fmt_out)
 {
-	int besttablecost = INT_MAX;
-	int beststeps = INT_MAX;
+	unsigned int besttablecost = INT_MAX;
+	unsigned int beststeps = INT_MAX;
 	struct ast_format best;
 	struct ast_format bestdst;
 	struct ast_format_cap *joint_cap = ast_format_cap_joint(dst_cap, src_cap);
@@ -1206,7 +1206,7 @@
 				if (!matrix_get(x, y) || !(matrix_get(x, y)->step)) {
 					continue;
 				}
-				if ((matrix_get(x, y)->table_cost < besttablecost || matrix_get(x, y)->multistep < beststeps)) {
+				if (((matrix_get(x, y)->table_cost < besttablecost) || (matrix_get(x, y)->multistep < beststeps))) {
 					/* better than what we have so far */
 					ast_format_copy(&best, &cur_src);
 					ast_format_copy(&bestdst, &cur_dst);




More information about the asterisk-commits mailing list