summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2009-06-15 17:34:30 +0000
committerKevin P. Fleming <kpfleming@digium.com>2009-06-15 17:34:30 +0000
commit82fb56886e20e6ed5e97058e68fb32c88029f060 (patch)
treefe279b2c51ac4293291cc172302c80d3d642c06f /main
parent43792496747f84ee565c35ef6e0262192e0663cb (diff)
More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/cli.c2
-rw-r--r--main/db.c2
-rw-r--r--main/devicestate.c2
-rw-r--r--main/event.c2
-rw-r--r--main/features.c14
-rw-r--r--main/file.c2
-rw-r--r--main/http.c2
-rw-r--r--main/image.c2
-rw-r--r--main/loader.c2
-rw-r--r--main/logger.c2
-rw-r--r--main/manager.c14
-rw-r--r--main/xmldoc.c2
12 files changed, 24 insertions, 24 deletions
diff --git a/main/cli.c b/main/cli.c
index 1bfe263f0..d1d4bb3a2 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -74,7 +74,7 @@ static int cli_default_perm = 1;
* it is already running. */
AST_MUTEX_DEFINE_STATIC(permsconfiglock);
/*! \brief List of users and permissions. */
-AST_RWLIST_HEAD_STATIC(cli_perms, usergroup_cli_perm);
+static AST_RWLIST_HEAD_STATIC(cli_perms, usergroup_cli_perm);
/*!
* \brief map a debug or verbose value to a filename
diff --git a/main/db.c b/main/db.c
index 244288a19..3ccd827f5 100644
--- a/main/db.c
+++ b/main/db.c
@@ -594,7 +594,7 @@ void ast_db_freetree(struct ast_db_entry *dbe)
}
}
-struct ast_cli_entry cli_database[] = {
+static struct ast_cli_entry cli_database[] = {
AST_CLI_DEFINE(handle_cli_database_show, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_showkey, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"),
diff --git a/main/devicestate.c b/main/devicestate.c
index fb5bd6760..17178faf2 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -190,7 +190,7 @@ struct devstate_change {
char device[1];
};
-struct {
+static struct {
pthread_t thread;
struct ast_event_sub *event_sub;
ast_cond_t cond;
diff --git a/main/event.c b/main/event.c
index 483d47832..3370cf8b3 100644
--- a/main/event.c
+++ b/main/event.c
@@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/taskprocessor.h"
#include "asterisk/astobj2.h"
-struct ast_taskprocessor *event_dispatcher;
+static struct ast_taskprocessor *event_dispatcher;
/*!
* \brief An event information element
diff --git a/main/features.c b/main/features.c
index d4a5e5db6..664c6c87b 100644
--- a/main/features.c
+++ b/main/features.c
@@ -339,17 +339,17 @@ static void *dial_features_duplicate(void *data)
memcpy(df_copy, df, sizeof(*df));
return df_copy;
- }
-
- static void dial_features_destroy(void *data)
- {
+}
+
+static void dial_features_destroy(void *data)
+{
struct ast_dial_features *df = data;
if (df) {
ast_free(df);
}
- }
-
- const struct ast_datastore_info dial_features_info = {
+}
+
+static const struct ast_datastore_info dial_features_info = {
.type = "dial-features",
.destroy = dial_features_destroy,
.duplicate = dial_features_duplicate,
diff --git a/main/file.c b/main/file.c
index 3c60d4244..cfeb2d1a9 100644
--- a/main/file.c
+++ b/main/file.c
@@ -1365,7 +1365,7 @@ static char *handle_cli_core_show_file_formats(struct ast_cli_entry *e, int cmd,
#undef FORMAT2
}
-struct ast_cli_entry cli_file[] = {
+static struct ast_cli_entry cli_file[] = {
AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
};
diff --git a/main/http.c b/main/http.c
index f99c03e91..a5dd568bf 100644
--- a/main/http.c
+++ b/main/http.c
@@ -116,7 +116,7 @@ struct http_uri_redirect {
static AST_RWLIST_HEAD_STATIC(uri_redirects, http_uri_redirect);
-const struct ast_cfhttp_methods_text {
+static const struct ast_cfhttp_methods_text {
enum ast_http_method method;
const char text[];
} ast_http_methods_text[] = {
diff --git a/main/image.c b/main/image.c
index 8ecea603b..5da07ce06 100644
--- a/main/image.c
+++ b/main/image.c
@@ -197,7 +197,7 @@ static char *handle_core_show_image_formats(struct ast_cli_entry *e, int cmd, st
return CLI_SUCCESS;
}
-struct ast_cli_entry cli_image[] = {
+static struct ast_cli_entry cli_image[] = {
AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
};
diff --git a/main/loader.c b/main/loader.c
index 48e9bbb22..45b66612e 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -125,7 +125,7 @@ static AST_LIST_HEAD_STATIC(reload_queue, reload_queue_item);
need to know what filename the module was loaded from while it
is being registered
*/
-struct ast_module *resource_being_loaded;
+static struct ast_module *resource_being_loaded;
/* XXX: should we check for duplicate resource names here? */
diff --git a/main/logger.c b/main/logger.c
index 2c1d9ab17..75b89f428 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -97,7 +97,7 @@ static char exec_after_rotate[256] = "";
static int filesize_reload_needed;
static unsigned int global_logmask = 0xFFFF;
-enum rotatestrategy {
+static enum rotatestrategy {
SEQUENTIAL = 1 << 0, /* Original method - create a new file, in order */
ROTATE = 1 << 1, /* Rotate all files, such that the oldest file has the highest suffix */
TIMESTAMP = 1 << 2, /* Append the epoch timestamp onto the end of the archived file */
diff --git a/main/manager.c b/main/manager.c
index 70c855b23..10087fcca 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -5006,7 +5006,7 @@ static int rawman_http_callback(struct ast_tcptls_session_instance *ser, const s
return generic_http_callback(ser, method, FORMAT_RAW, &ser->remote_address, uri, get_params, headers);
}
-struct ast_http_uri rawmanuri = {
+static struct ast_http_uri rawmanuri = {
.description = "Raw HTTP Manager Event Interface",
.uri = "rawman",
.callback = rawman_http_callback,
@@ -5014,7 +5014,7 @@ struct ast_http_uri rawmanuri = {
.key = __FILE__,
};
-struct ast_http_uri manageruri = {
+static struct ast_http_uri manageruri = {
.description = "HTML Manager Event Interface",
.uri = "manager",
.callback = manager_http_callback,
@@ -5022,7 +5022,7 @@ struct ast_http_uri manageruri = {
.key = __FILE__,
};
-struct ast_http_uri managerxmluri = {
+static struct ast_http_uri managerxmluri = {
.description = "XML Manager Event Interface",
.uri = "mxml",
.callback = mxml_http_callback,
@@ -5047,7 +5047,7 @@ static int auth_rawman_http_callback(struct ast_tcptls_session_instance *ser, co
return auth_http_callback(ser, method, FORMAT_RAW, &ser->remote_address, uri, get_params, headers);
}
-struct ast_http_uri arawmanuri = {
+static struct ast_http_uri arawmanuri = {
.description = "Raw HTTP Manager Event Interface w/Digest authentication",
.uri = "arawman",
.has_subtree = 0,
@@ -5056,7 +5056,7 @@ struct ast_http_uri arawmanuri = {
.key = __FILE__,
};
-struct ast_http_uri amanageruri = {
+static struct ast_http_uri amanageruri = {
.description = "HTML Manager Event Interface w/Digest authentication",
.uri = "amanager",
.has_subtree = 0,
@@ -5065,7 +5065,7 @@ struct ast_http_uri amanageruri = {
.key = __FILE__,
};
-struct ast_http_uri amanagerxmluri = {
+static struct ast_http_uri amanagerxmluri = {
.description = "XML Manager Event Interface w/Digest authentication",
.uri = "amxml",
.has_subtree = 0,
@@ -5086,7 +5086,7 @@ static void purge_old_stuff(void *data)
purge_events();
}
-struct ast_tls_config ami_tls_cfg;
+static struct ast_tls_config ami_tls_cfg;
static struct ast_tcptls_session_args ami_desc = {
.accept_fd = -1,
.master = AST_PTHREADT_NULL,
diff --git a/main/xmldoc.c b/main/xmldoc.c
index 72625ff0e..17a756a27 100644
--- a/main/xmldoc.c
+++ b/main/xmldoc.c
@@ -1050,7 +1050,7 @@ enum syntaxtype {
};
/*! \brief Mapping between type of node and type of syntax to generate. */
-struct strsyntaxtype {
+static struct strsyntaxtype {
const char *type;
enum syntaxtype stxtype;
} stxtype[] = {