[asterisk-commits] twilson: trunk r113170 - /trunk/res/res_phoneprov.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 7 13:57:22 CDT 2008


Author: twilson
Date: Mon Apr  7 13:57:21 2008
New Revision: 113170

URL: http://svn.digium.com/view/asterisk?view=rev&rev=113170
Log:
atoi(NULL) is bad

Modified:
    trunk/res/res_phoneprov.c

Modified: trunk/res/res_phoneprov.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_phoneprov.c?view=diff&rev=113170&r1=113169&r2=113170
==============================================================================
--- trunk/res/res_phoneprov.c (original)
+++ trunk/res/res_phoneprov.c Mon Apr  7 13:57:21 2008
@@ -166,12 +166,12 @@
 	{ "mp3", "audio/mpeg" },
 };
 
-char global_server[80] = "";	/*!< Server to substitute into templates */
-char global_serverport[6] = "";	/*!< Server port to substitute into templates */
-char global_default_profile[80] = "";	/*!< Default profile to use if one isn't specified */	
+static char global_server[80] = "";	/*!< Server to substitute into templates */
+static char global_serverport[6] = "";	/*!< Server port to substitute into templates */
+static char global_default_profile[80] = "";	/*!< Default profile to use if one isn't specified */	
 
 /*! \brief List of global variables currently available: VOICEMAIL_EXTEN, EXTENSION_LENGTH */
-struct varshead global_variables;
+static struct varshead global_variables;
 
 /*! \brief Return mime type based on extension */
 static char *ftype2mtype(const char *ftype)
@@ -728,7 +728,7 @@
 		} else if (i == PP_TIMEZONE) {
 			/* perfectly ok if tmp is NULL, will set variables based on server's time zone */
 			set_timezone_variables(exten->headp, tmp);
-		} else if (i == PP_LINENUMBER) {
+		} else if (i == PP_LINENUMBER && tmp) {
 			exten->index = atoi(tmp);
 		}
 




More information about the asterisk-commits mailing list