[Freeswitch-svn] [commit] r3055 - freeswitch/trunk/src/mod/codecs/mod_amr

Freeswitch SVN mikej at freeswitch.org
Sun Oct 15 01:24:00 EDT 2006


Author: mikej
Date: Sun Oct 15 01:24:00 2006
New Revision: 3055

Modified:
   freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c

Log:
cast atoi returns.

Modified: freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	Sun Oct 15 01:24:00 2006
@@ -161,11 +161,11 @@
 					} else if (!strcasecmp(data, "mode-change-period")) {
 						context->change_period = atoi(arg);
 					} else if (!strcasecmp(data, "ptime")) {
-						context->ptime = atoi(arg);
+						context->ptime = (switch_byte_t)atoi(arg);
 					} else if (!strcasecmp(data, "channels")) {
-						context->channels = atoi(arg);
+						context->channels = (switch_byte_t)atoi(arg);
 					} else if (!strcasecmp(data, "maxptime")) {
-						context->max_ptime = atoi(arg);
+						context->max_ptime = (switch_byte_t)atoi(arg);
 					} else if (!strcasecmp(data, "mode-set")) {
 						int y, m_argc;
 						char *m_argv[7];
@@ -182,7 +182,7 @@
 		if (context->enc_modes) {
 			for (i = 7; i > -1; i++) {
 				if (context->enc_modes & (1 << i)) {
-					context->enc_mode = i;
+					context->enc_mode = (switch_byte_t)i;
 					break;
 				}
 			}
@@ -325,7 +325,7 @@
 				char *var = (char *) switch_xml_attr_soft(param, "name");
 				char *val = (char *) switch_xml_attr_soft(param, "value");
 				if (!strcasecmp(var, "default-bitrate")) {
-					globals.default_bitrate = atoi(val);
+					globals.default_bitrate = (switch_byte_t)atoi(val);
 				}
 			}
 		}



More information about the Freeswitch-svn mailing list