[asterisk-commits] kpfleming: branch 1.4 r49006 - /branches/1.4/main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Dec 27 15:06:57 MST 2006


Author: kpfleming
Date: Wed Dec 27 16:06:56 2006
New Revision: 49006

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49006
Log:
since these variables all have static duration, none of them need initializers (they default to zero anyway)

Modified:
    branches/1.4/main/asterisk.c
    branches/1.4/main/cdr.c
    branches/1.4/main/channel.c
    branches/1.4/main/dnsmgr.c
    branches/1.4/main/enum.c
    branches/1.4/main/file.c
    branches/1.4/main/frame.c
    branches/1.4/main/http.c
    branches/1.4/main/logger.c
    branches/1.4/main/manager.c
    branches/1.4/main/pbx.c
    branches/1.4/main/rtp.c
    branches/1.4/main/term.c
    branches/1.4/main/udptl.c

Modified: branches/1.4/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Wed Dec 27 16:06:56 2006
@@ -154,11 +154,11 @@
 
 struct ast_flags ast_options = { AST_DEFAULT_OPTIONS };
 
-int option_verbose = 0;				/*!< Verbosity level */
-int option_debug = 0;				/*!< Debug level */
-
-double option_maxload = 0.0;			/*!< Max load avg on system */
-int option_maxcalls = 0;			/*!< Max number of active calls */
+int option_verbose;				/*!< Verbosity level */
+int option_debug;				/*!< Debug level */
+
+double option_maxload;				/*!< Max load avg on system */
+int option_maxcalls;				/*!< Max number of active calls */
 
 /*! @} */
 
@@ -185,8 +185,8 @@
 time_t ast_startuptime;
 time_t ast_lastreloadtime;
 
-static History *el_hist = NULL;
-static EditLine *el = NULL;
+static History *el_hist;
+static EditLine *el;
 static char *remotehostname;
 
 struct console consoles[AST_MAX_CONNECTS];
@@ -227,8 +227,8 @@
 extern const char *ast_build_user;
 
 static char *_argv[256];
-static int shuttingdown = 0;
-static int restartnow = 0;
+static int shuttingdown;
+static int restartnow;
 static pthread_t consolethread = AST_PTHREADT_NULL;
 
 static char randompool[256];

Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Wed Dec 27 16:06:56 2006
@@ -57,7 +57,7 @@
 
 /*! Default AMA flag for billing records (CDR's) */
 int ast_default_amaflags = AST_CDR_DOCUMENTATION;
-char ast_default_accountcode[AST_MAX_ACCOUNT_CODE] = "";
+char ast_default_accountcode[AST_MAX_ACCOUNT_CODE];
 
 struct ast_cdr_beitem {
 	char name[20];

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Wed Dec 27 16:06:56 2006
@@ -95,11 +95,11 @@
 #endif
 
 /*! Prevent new channel allocation if shutting down. */
-static int shutting_down = 0;
-
-static int uniqueint = 0;
-
-unsigned long global_fin = 0, global_fout = 0;
+static int shutting_down;
+
+static int uniqueint;
+
+unsigned long global_fin, global_fout;
 
 AST_THREADSTORAGE(state2str_threadbuf, state2str_threadbuf_init);
 #define STATE2STR_BUFSIZE   32

Modified: branches/1.4/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/dnsmgr.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/dnsmgr.c (original)
+++ branches/1.4/main/dnsmgr.c Wed Dec 27 16:06:56 2006
@@ -71,7 +71,7 @@
 
 #define REFRESH_DEFAULT 300
 
-static int enabled = 0;
+static int enabled;
 static int refresh_interval;
 
 struct refresh_info {

Modified: branches/1.4/main/enum.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/enum.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/enum.c (original)
+++ branches/1.4/main/enum.c Wed Dec 27 16:06:56 2006
@@ -85,7 +85,7 @@
 	struct enum_search *next;
 } *toplevs;
 
-static int enumver = 0;
+static int enumver;
 
 AST_MUTEX_DEFINE_STATIC(enumlock);
 

Modified: branches/1.4/main/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/file.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/file.c (original)
+++ branches/1.4/main/file.c Wed Dec 27 16:06:56 2006
@@ -61,7 +61,7 @@
  * (i.e. en/digits/1.gsm, it/digits/1.gsm or default to digits/1.gsm).
  * The latter permits a language to be entirely in one directory.
  */
-int ast_language_is_prefix = 0;
+int ast_language_is_prefix;
 
 static AST_LIST_HEAD_STATIC(formats, ast_format);
 

Modified: branches/1.4/main/frame.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/frame.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/frame.c (original)
+++ branches/1.4/main/frame.c Wed Dec 27 16:06:56 2006
@@ -45,7 +45,7 @@
 #include "asterisk/linkedlists.h"
 
 #ifdef TRACE_FRAMES
-static int headers = 0;
+static int headers;
 static AST_LIST_HEAD_STATIC(headerlist, ast_frame);
 #endif
 

Modified: branches/1.4/main/http.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/http.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/http.c (original)
+++ branches/1.4/main/http.c Wed Dec 27 16:06:56 2006
@@ -65,14 +65,14 @@
 };
 
 AST_MUTEX_DEFINE_STATIC(uris_lock);
-static struct ast_http_uri *uris = NULL;
+static struct ast_http_uri *uris;
 
 static int httpfd = -1;
 static pthread_t master = AST_PTHREADT_NULL;
 static char prefix[MAX_PREFIX];
-static int prefix_len = 0;
+static int prefix_len;
 static struct sockaddr_in oldsin;
-static int enablestatic=0;
+static int enablestatic;
 
 /*! \brief Limit the kinds of files we're willing to serve up */
 static struct {

Modified: branches/1.4/main/logger.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/logger.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/logger.c (original)
+++ branches/1.4/main/logger.c Wed Dec 27 16:06:56 2006
@@ -83,7 +83,7 @@
 
 static char dateformat[256] = "%b %e %T";		/* Original Asterisk Format */
 
-static int filesize_reload_needed = 0;
+static int filesize_reload_needed;
 static int global_logmask = -1;
 
 static struct {
@@ -111,8 +111,8 @@
 
 static AST_LIST_HEAD_STATIC(logchannels, logchannel);
 
-static FILE *eventlog = NULL;
-static FILE *qlog = NULL;
+static FILE *eventlog;
+static FILE *qlog;
 
 static char *levels[] = {
 	"DEBUG",

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Wed Dec 27 16:06:56 2006
@@ -92,16 +92,16 @@
 	char eventdata[1];
 };
 
-static int enabled = 0;
+static int enabled;
 static int portno = DEFAULT_MANAGER_PORT;
 static int asock = -1;
 static int displayconnects = 1;
-static int timestampevents = 0;
+static int timestampevents;
 static int httptimeout = 60;
 
 static pthread_t t;
-static int block_sockets = 0;
-static int num_sessions = 0;
+static int block_sockets;
+static int num_sessions;
 
 /* Protected by the sessions list lock */
 struct eventqent *master_eventq = NULL;
@@ -187,7 +187,7 @@
 
 static AST_LIST_HEAD_STATIC(users, ast_manager_user);
 
-static struct manager_action *first_action = NULL;
+static struct manager_action *first_action;
 AST_MUTEX_DEFINE_STATIC(actionlock);
 
 /*! \brief Convert authority code to string with serveral options */

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Dec 27 16:06:56 2006
@@ -243,7 +243,7 @@
 static int autofallthrough = 1;
 
 AST_MUTEX_DEFINE_STATIC(maxcalllock);
-static int countcalls = 0;
+static int countcalls;
 
 static AST_LIST_HEAD_STATIC(acf_root, ast_custom_function);
 
@@ -460,7 +460,7 @@
 
 };
 
-static struct ast_context *contexts = NULL;
+static struct ast_context *contexts;
 AST_MUTEX_DEFINE_STATIC(conlock); 		/*!< Lock for the ast_context list */
 
 static AST_LIST_HEAD_STATIC(apps, ast_app);
@@ -475,14 +475,14 @@
    paths that require both locks must also take them in that order.
 */
 static AST_LIST_HEAD_STATIC(hints, ast_hint);
-struct ast_state_cb *statecbs = NULL;
+struct ast_state_cb *statecbs;
 
 /*
    \note This function is special. It saves the stack so that no matter
    how many times it is called, it returns to the same place */
 int pbx_exec(struct ast_channel *c, 		/*!< Channel */
-		struct ast_app *app,		/*!< Application */
-		void *data)			/*!< Data for execution */
+	     struct ast_app *app,		/*!< Application */
+	     void *data)			/*!< Data for execution */
 {
 	int res;
 

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Wed Dec 27 16:06:56 2006
@@ -77,17 +77,17 @@
 
 static int dtmftimeout = DEFAULT_DTMF_TIMEOUT;
 
-static int rtpstart = 0;		/*!< First port for RTP sessions (set in rtp.conf) */
-static int rtpend = 0;			/*!< Last port for RTP sessions (set in rtp.conf) */
-static int rtpdebug = 0;		/*!< Are we debugging? */
-static int rtcpdebug = 0;		/*!< Are we debugging RTCP? */
-static int rtcpstats = 0;		/*!< Are we debugging RTCP? */
+static int rtpstart;			/*!< First port for RTP sessions (set in rtp.conf) */
+static int rtpend;			/*!< Last port for RTP sessions (set in rtp.conf) */
+static int rtpdebug;			/*!< Are we debugging? */
+static int rtcpdebug;			/*!< Are we debugging RTCP? */
+static int rtcpstats;			/*!< Are we debugging RTCP? */
 static int rtcpinterval = RTCP_DEFAULT_INTERVALMS; /*!< Time between rtcp reports in millisecs */
-static int stundebug = 0;		/*!< Are we debugging stun? */
+static int stundebug;			/*!< Are we debugging stun? */
 static struct sockaddr_in rtpdebugaddr;	/*!< Debug packets to/from this host */
 static struct sockaddr_in rtcpdebugaddr;	/*!< Debug RTCP packets to/from this host */
 #ifdef SO_NO_CHECK
-static int nochecksums = 0;
+static int nochecksums;
 #endif
 
 /*!

Modified: branches/1.4/main/term.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/term.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/term.c (original)
+++ branches/1.4/main/term.c Wed Dec 27 16:06:56 2006
@@ -43,7 +43,7 @@
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
 
-static int vt100compat = 0;
+static int vt100compat;
 
 static char prepdata[80] = "";
 static char enddata[80] = "";

Modified: branches/1.4/main/udptl.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/udptl.c?view=diff&rev=49006&r1=49005&r2=49006
==============================================================================
--- branches/1.4/main/udptl.c (original)
+++ branches/1.4/main/udptl.c Wed Dec 27 16:06:56 2006
@@ -55,17 +55,17 @@
 #define TRUE (!FALSE)
 #endif
 
-static int udptlstart = 0;
-static int udptlend = 0;
-static int udptldebug = 0;                  /* Are we debugging? */
+static int udptlstart;
+static int udptlend;
+static int udptldebug;	                  /* Are we debugging? */
 static struct sockaddr_in udptldebugaddr;   /* Debug packets to/from this host */
 #ifdef SO_NO_CHECK
-static int nochecksums = 0;
+static int nochecksums;
 #endif
-static int udptlfectype = 0;
-static int udptlfecentries = 0;
-static int udptlfecspan = 0;
-static int udptlmaxdatagram = 0;
+static int udptlfectype;
+static int udptlfecentries;
+static int udptlfecspan;
+static int udptlmaxdatagram;
 
 #define LOCAL_FAX_MAX_DATAGRAM      400
 #define MAX_FEC_ENTRIES             5
@@ -137,7 +137,7 @@
 	udptl_fec_rx_buffer_t rx[UDPTL_BUF_MASK + 1];
 };
 
-static struct ast_udptl_protocol *protos = NULL;
+static struct ast_udptl_protocol *protos;
 
 static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len);
 static int udptl_build_packet(struct ast_udptl *s, uint8_t *buf, uint8_t *ifp, int ifp_len);



More information about the asterisk-commits mailing list