]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
since these variables all have static duration, none of them need initializers (they...
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 27 Dec 2006 22:06:56 +0000 (22:06 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 27 Dec 2006 22:06:56 +0000 (22:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49006 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 files changed:
main/asterisk.c
main/cdr.c
main/channel.c
main/dnsmgr.c
main/enum.c
main/file.c
main/frame.c
main/http.c
main/logger.c
main/manager.c
main/pbx.c
main/rtp.c
main/term.c
main/udptl.c

index 27f433896b76918d96816c028beb6f737d1aabb8..929a83b4789fae03972e014eb58c33ac9e51fa28 100644 (file)
@@ -154,11 +154,11 @@ int daemon(int, int);  /* defined in libresolv of all places */
 
 struct ast_flags ast_options = { AST_DEFAULT_OPTIONS };
 
-int option_verbose = 0;                                /*!< Verbosity level */
-int option_debug = 0;                          /*!< Debug level */
+int option_verbose;                            /*!< Verbosity level */
+int option_debug;                              /*!< Debug level */
 
-double option_maxload = 0.0;                   /*!< Max load avg on system */
-int option_maxcalls = 0;                       /*!< Max number of active calls */
+double option_maxload;                         /*!< Max load avg on system */
+int option_maxcalls;                           /*!< Max number of active calls */
 
 /*! @} */
 
@@ -185,8 +185,8 @@ static AST_LIST_HEAD_STATIC(atexits, ast_atexit);
 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_date;
 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];
index 0d5357a301ab7fdbfb17c228f664cea8d506ea58..02794ddf0960106fa199636c9ab8afda5a94846e 100644 (file)
@@ -57,7 +57,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 /*! 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];
index 95293d6614a69c93e239918c4c78b3bf80deef3b..18a5b78054d315e05407f47fdccb6ea5cfc525a1 100644 (file)
@@ -95,11 +95,11 @@ struct ast_channel_whisper_buffer {
 #endif
 
 /*! Prevent new channel allocation if shutting down. */
-static int shutting_down = 0;
+static int shutting_down;
 
-static int uniqueint = 0;
+static int uniqueint;
 
-unsigned long global_fin = 0, global_fout = 0;
+unsigned long global_fin, global_fout;
 
 AST_THREADSTORAGE(state2str_threadbuf, state2str_threadbuf_init);
 #define STATE2STR_BUFSIZE   32
index e7ce3190dec06f93dd53fd6eee22943b2bf0e23f..59c3a9994edea04c8621ae6bd56d3704f308e382 100644 (file)
@@ -71,7 +71,7 @@ AST_MUTEX_DEFINE_STATIC(refresh_lock);
 
 #define REFRESH_DEFAULT 300
 
-static int enabled = 0;
+static int enabled;
 static int refresh_interval;
 
 struct refresh_info {
index 27d70a92d7fd35a7e1d9d698babdaba187923458..aece8e5728e57074e0825b8f360f1548864efffd 100644 (file)
@@ -85,7 +85,7 @@ static struct enum_search {
        struct enum_search *next;
 } *toplevs;
 
-static int enumver = 0;
+static int enumver;
 
 AST_MUTEX_DEFINE_STATIC(enumlock);
 
index 325676f6e3d1ae53781095bc8ceef58628f114d4..6c78632626ab068275ccbbfb3888523c528389c8 100644 (file)
@@ -61,7 +61,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
  * (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);
 
index a86e291ea7d2ad3b7e4c29ad8eb303f1a54ae44a..812c15a5244b934b4dcb0ce2456ecdb0b0a38092 100644 (file)
@@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/linkedlists.h"
 
 #ifdef TRACE_FRAMES
-static int headers = 0;
+static int headers;
 static AST_LIST_HEAD_STATIC(headerlist, ast_frame);
 #endif
 
index 78b1a960b8f75902c60a687fbbe15b98ba2149d9..330a9c0f40ab422cb70decd743765d40c61a7804 100644 (file)
@@ -65,14 +65,14 @@ struct ast_http_server_instance {
 };
 
 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 {
index 21effac71773c120204b2713e43ea61428a82712..1ec8bc66bf936d1c88b13f84d850619c973da361 100644 (file)
@@ -83,7 +83,7 @@ static int syslog_level_map[] = {
 
 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 @@ struct logchannel {
 
 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",
index 7a3270de9ba97ed90f8dc59c8335d5dedb7d6580..c0fa09a470bab5b55b495e917e64b196dbf935b3 100644 (file)
@@ -92,16 +92,16 @@ struct eventqent {
        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 @@ struct ast_manager_user {
 
 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 */
index 7002819be81af1289ece3487896ed9a52cd1990f..06202ad0e8fcf5a71a8a41c30cf16932421accdc 100644 (file)
@@ -243,7 +243,7 @@ static struct varshead globals = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
 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 pbx_builtin {
 
 };
 
-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 @@ static int stateid = 1;
    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;
 
index 9b97b7ee3aa696a9d8f763e5fe2398af23ba8a6f..2c414f2f89a498ed39915e7a4e12c4a184211974 100644 (file)
@@ -77,17 +77,17 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 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
 
 /*!
index 940396ee366c3729531d066427f337ed5e6af7c5..d051338d873a8c371eb1c981ef41dcd61514e97b 100644 (file)
@@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
 
-static int vt100compat = 0;
+static int vt100compat;
 
 static char prepdata[80] = "";
 static char enddata[80] = "";
index c275b98bc6cf9b27bb204c41f12d858d90e3fa76..6d5c82a2d9067f19aface16b9224233448a1207d 100644 (file)
@@ -55,17 +55,17 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ struct ast_udptl {
        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);