summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-20 00:02:15 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:52:06 +0100
commit0500b87092540d300b4e021a0fb95ce16a44fbd2 (patch)
treed8ff9774916e84dbc568f77edd4925b1f6b51735 /source4/lib
parent3e75f222bcdf114238cc4f2bcc61332dc059135f (diff)
downloadsamba-0500b87092540d300b4e021a0fb95ce16a44fbd2.tar.gz
samba-0500b87092540d300b4e021a0fb95ce16a44fbd2.tar.bz2
samba-0500b87092540d300b4e021a0fb95ce16a44fbd2.zip
r26540: Revert my previous commit after concerns raised by Andrew.
(This used to be commit 6ac86f8be7d9a8c5ab396a93e6d1e6819e11f173)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/common/ldb.c2
-rw-r--r--source4/lib/ldb/ldb_map/ldb_map.c6
-rw-r--r--source4/lib/ldb/modules/paged_searches.c2
-rw-r--r--source4/lib/replace/inet_ntop.c2
-rw-r--r--source4/lib/replace/inet_pton.c4
-rw-r--r--source4/lib/replace/timegm.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index ab4abe6701..87f791cb38 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -162,7 +162,7 @@ void ldb_set_default_dns(struct ldb_context *ldb)
int ret;
struct ldb_result *res;
struct ldb_dn *tmp_dn=NULL;
- const char *attrs[] = {
+ static const char *attrs[] = {
"rootDomainNamingContext",
"configurationNamingContext",
"schemaNamingContext",
diff --git a/source4/lib/ldb/ldb_map/ldb_map.c b/source4/lib/ldb/ldb_map/ldb_map.c
index 87f5f25392..39df427c2c 100644
--- a/source4/lib/ldb/ldb_map/ldb_map.c
+++ b/source4/lib/ldb/ldb_map/ldb_map.c
@@ -867,7 +867,7 @@ static int map_objectclass_convert_operator(struct ldb_module *module, void *mem
struct ldb_parse_tree **new, const struct ldb_parse_tree *tree)
{
- const struct ldb_map_attribute objectclass_map = {
+ static const struct ldb_map_attribute objectclass_map = {
.local_name = "objectClass",
.type = MAP_CONVERT,
.u = {
@@ -956,7 +956,7 @@ struct ldb_request *map_search_self_req(struct map_context *ac, struct ldb_dn *d
/* attrs[] is returned from this function in
* ac->search_req->op.search.attrs, so it must be static, as
* otherwise the compiler can put it on the stack */
- const char * const attrs[] = { IS_MAPPED, NULL };
+ static const char * const attrs[] = { IS_MAPPED, NULL };
struct ldb_parse_tree *tree;
/* Limit search to records with 'IS_MAPPED' present */
@@ -1242,7 +1242,7 @@ static const struct ldb_map_attribute builtin_attribute_maps[] = {
* base DNs in private data. */
static int map_init_dns(struct ldb_module *module, struct ldb_map_context *data, const char *name)
{
- const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
+ static const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
struct ldb_dn *dn;
struct ldb_message *msg;
struct ldb_result *res;
diff --git a/source4/lib/ldb/modules/paged_searches.c b/source4/lib/ldb/modules/paged_searches.c
index 69ce219362..749858b49b 100644
--- a/source4/lib/ldb/modules/paged_searches.c
+++ b/source4/lib/ldb/modules/paged_searches.c
@@ -407,7 +407,7 @@ static int check_supported_paged(struct ldb_context *ldb, void *context,
static int ps_init(struct ldb_module *module)
{
- const char *attrs[] = { "supportedControl", NULL };
+ static const char *attrs[] = { "supportedControl", NULL };
struct private_data *data;
int ret;
struct ldb_request *req;
diff --git a/source4/lib/replace/inet_ntop.c b/source4/lib/replace/inet_ntop.c
index 1b84cda6f0..fb3d8e90c8 100644
--- a/source4/lib/replace/inet_ntop.c
+++ b/source4/lib/replace/inet_ntop.c
@@ -74,7 +74,7 @@ rep_inet_ntop(int af, const void *src, char *dst, socklen_t size)
static const char *
inet_ntop4(const unsigned char *src, char *dst, socklen_t size)
{
- const char *fmt = "%u.%u.%u.%u";
+ static const char *fmt = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
size_t len;
diff --git a/source4/lib/replace/inet_pton.c b/source4/lib/replace/inet_pton.c
index ea0fe6b78c..80e4865ef4 100644
--- a/source4/lib/replace/inet_pton.c
+++ b/source4/lib/replace/inet_pton.c
@@ -77,7 +77,7 @@ inet_pton4(src, dst)
const char *src;
unsigned char *dst;
{
- const char digits[] = "0123456789";
+ static const char digits[] = "0123456789";
int saw_digit, octets, ch;
unsigned char tmp[NS_INADDRSZ], *tp;
@@ -131,7 +131,7 @@ inet_pton6(src, dst)
const char *src;
unsigned char *dst;
{
- const char xdigits_l[] = "0123456789abcdef",
+ static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
diff --git a/source4/lib/replace/timegm.c b/source4/lib/replace/timegm.c
index 86f360bd3c..395c684e11 100644
--- a/source4/lib/replace/timegm.c
+++ b/source4/lib/replace/timegm.c
@@ -46,7 +46,7 @@ static int is_leap(unsigned y)
time_t rep_timegm(struct tm *tm)
{
- const unsigned ndays[2][12] ={
+ static const unsigned ndays[2][12] ={
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
time_t res = 0;