r26539: Remove unnecessary statics.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 19 Dec 2007 22:27:42 +0000 (23:27 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:52:05 +0000 (05:52 +0100)
37 files changed:
source/auth/auth.c
source/auth/gensec/cyrus_sasl.c
source/auth/gensec/schannel_sign.c
source/client/cifsdd.c
source/cluster/ctdb/brlock_ctdb.c
source/cluster/ctdb/tools/ctdb.c
source/dsdb/repl/drepl_partitions.c
source/dsdb/samdb/ldb_modules/kludge_acl.c
source/dsdb/samdb/ldb_modules/local_password.c
source/dsdb/samdb/ldb_modules/naming_fsmo.c
source/dsdb/samdb/ldb_modules/objectclass.c
source/dsdb/samdb/ldb_modules/password_hash.c
source/dsdb/samdb/ldb_modules/pdc_fsmo.c
source/dsdb/samdb/ldb_modules/ranged_results.c
source/dsdb/samdb/ldb_modules/repl_meta_data.c
source/dsdb/samdb/ldb_modules/schema.c
source/dsdb/samdb/ldb_modules/schema_fsmo.c
source/dsdb/samdb/ldb_modules/simple_ldap_map.c
source/dsdb/schema/schema_init.c
source/heimdal/kdc/digest.c
source/lib/ldb/common/ldb.c
source/lib/ldb/ldb_map/ldb_map.c
source/lib/ldb/modules/paged_searches.c
source/lib/replace/inet_ntop.c
source/lib/replace/inet_pton.c
source/lib/replace/timegm.c
source/libcli/ldap/ldap_bind.c
source/libnet/libnet_become_dc.c
source/libnet/libnet_unbecome_dc.c
source/rpc_server/drsuapi/dcesrv_drsuapi.c
source/rpc_server/samr/dcesrv_samr.c
source/scripting/ejs/ejsnet/net_user.c
source/torture/ldap/uptodatevector.c
source/torture/nbt/winsreplication.c
source/torture/smbtorture.c
source/utils/ntlm_auth.c
source/utils/testparm.c

index 918890b3f621d3e372f3fdb8e85ebeea8f1a649f..708e2f8d735ee80eb8a7a2c852f746b4f80dd2dd 100644 (file)
@@ -500,7 +500,7 @@ const struct auth_operations *auth_backend_byname(const char *name)
 */
 const struct auth_critical_sizes *auth_interface_version(void)
 {
-       static const struct auth_critical_sizes critical_sizes = {
+       const static struct auth_critical_sizes critical_sizes = {
                AUTH_INTERFACE_VERSION,
                sizeof(struct auth_operations),
                sizeof(struct auth_method_context),
index 64a0b2f0c777df84d0f791155faeff367f341f23..331499a4666a98ff2bd47c29d4457e0e3a1f5f20 100644 (file)
@@ -365,7 +365,7 @@ NTSTATUS gensec_sasl_init(void)
        int sasl_ret, i;
        const char **sasl_mechs;
        
-       static const sasl_callback_t callbacks[] = {
+       const sasl_callback_t callbacks[] = {
                { 
                        .id = SASL_CB_LOG,
                        .proc = gensec_sasl_log,
index 1e57beba08974882bf5acdd9407129bef13aec80..71ac0cc933506ed05698ba08bc6285d9121cc7b1 100644 (file)
@@ -113,7 +113,7 @@ NTSTATUS schannel_unseal_packet(struct gensec_security *gensec_security,
        uint8_t confounder[8];
        uint8_t seq_num[8];
        uint8_t sealing_key[16];
-       static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+       const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
 
        if (sig->length != 32) {
                return NT_STATUS_ACCESS_DENIED;
@@ -162,7 +162,7 @@ NTSTATUS schannel_check_packet(struct gensec_security *gensec_security,
 
        uint8_t digest_final[16];
        uint8_t seq_num[8];
-       static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+       const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
 
        /* w2k sends just 24 bytes and skip the confounder */
        if (sig->length != 32 && sig->length != 24) {
@@ -212,7 +212,7 @@ NTSTATUS schannel_seal_packet(struct gensec_security *gensec_security,
        uint8_t confounder[8];
        uint8_t seq_num[8];
        uint8_t sealing_key[16];
-       static const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
+       const uint8_t netsec_sig[8] = NETSEC_SEAL_SIGNATURE;
 
        generate_random_buffer(confounder, 8);
 
@@ -258,7 +258,7 @@ NTSTATUS schannel_sign_packet(struct gensec_security *gensec_security,
 
        uint8_t digest_final[16];
        uint8_t seq_num[8];
-       static const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
+       const uint8_t netsec_sig[8] = NETSEC_SIGN_SIGNATURE;
 
        RSIVAL(seq_num, 0, state->seq_num);
        SIVAL(seq_num, 4, state->initiator?0x80:0);
index 08c152c3a5cf01ae591a05ee289de31184be2348..c692aa1bc3c58cfdf2005abd196efee7703138e3 100644 (file)
@@ -59,7 +59,7 @@ static void dd_handle_signal(int sig)
 
 static const char * argtype_str(enum argtype arg_type)
 {
-       static const struct {
+       const struct {
                enum argtype arg_type;
                const char * arg_name;
        } names [] = 
@@ -295,7 +295,7 @@ static void cifsdd_help_message(poptContext pctx,
                const char * parg,
                void * pdata)
 {
-       static const char notes[] = 
+       const char notes[] = 
 "FILE can be a local filename or a UNC path of the form //server/share/path.\n";
 
        char prefix[24];
index c38d666c3c60f7e1cf039a506faf6ba0b724b38f..1b22c6c72701b22ddba37b57b4ef99c76bc2a55a 100644 (file)
@@ -102,7 +102,7 @@ static void show_locks(const char *op, struct lock_struct *locks, int count)
   talloc_free(). We need the messaging_ctx to allow for
   pending lock notifications.
 */
-static struct brl_context *brl_ctdb_init(TALLOC_CTX *mem_ctx, struct server_id server, 
+static struct brl_context *brl_ctdb_init(TALLOC_CTX *mem_ctx, struct server_id server, struct loadparm_context *lp_ctx,
                                    struct messaging_context *messaging_ctx)
 {
        struct ctdb_context *ctdb = talloc_get_type(cluster_backend_handle(), 
index 2308261d00535eb0079063ed30bf2a1ac7ee5587..7d25c068bc05273260a599648a0a8a7faf05626c 100644 (file)
@@ -241,7 +241,7 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
 
        printf("Number of nodes:%d\n", nodemap->num);
        for(i=0;i<nodemap->num;i++){
-               static const struct {
+               const struct {
                        uint32_t flag;
                        const char *name;
                } flag_names[] = {
index 8c0d8e589773696574ef2313049b0e81830e05ae..70224152eb01b7754901eba75ae29e9ff7e73b9f 100644 (file)
@@ -40,7 +40,7 @@ WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
        struct ldb_dn *basedn;
        struct ldb_result *r;
        struct ldb_message_element *el;
-       static const char *attrs[] = { "namingContexts", NULL };
+       const char *attrs[] = { "namingContexts", NULL };
        uint32_t i;
        int ret;
 
@@ -188,7 +188,7 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
        struct ldb_result *r;
        uint32_t i;
        int ret;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "objectSid",
                "objectGUID",
                "replUpToDateVector",
index 97130495a3adde2df3d54a8427cc366c0080a530..9a05c866c563308a8bbde04184fd39ef2ce6608f 100644 (file)
@@ -408,7 +408,7 @@ static int kludge_acl_init(struct ldb_module *module)
 {
        int ret, i;
        TALLOC_CTX *mem_ctx = talloc_new(module);
-       static const char *attrs[] = { "passwordAttribute", NULL };
+       const char *attrs[] = { "passwordAttribute", NULL };
        struct ldb_result *res;
        struct ldb_message *msg;
        struct ldb_message_element *password_attributes;
index 350434df51733a768e8eebaec41a3eb95f18baa1..bbbbbd71c87a7f5908579fabc3aff431588a042e 100644 (file)
@@ -378,7 +378,7 @@ static int get_self_callback(struct ldb_context *ldb, void *context, struct ldb_
 static int local_password_mod_search_self(struct ldb_handle *h) {
 
        struct lpdb_context *ac;
-       static const char * const attrs[] = { "objectGUID", "objectClass", NULL };
+       const char * const attrs[] = { "objectGUID", "objectClass", NULL };
 
        ac = talloc_get_type(h->private_data, struct lpdb_context);
 
index d6b6a242875681cf54f0fe26045c9c7352daf625..41d35dffc1a6302bc60c931ec73da43b39fdd20c 100644 (file)
@@ -38,7 +38,7 @@ static int naming_fsmo_init(struct ldb_module *module)
        struct dsdb_naming_fsmo *naming_fsmo;
        struct ldb_result *naming_res;
        int ret;
-       static const char *naming_attrs[] = {
+       const char *naming_attrs[] = {
                "fSMORoleOwner",
                NULL
        };
index da5cae1c658461468395d7fc751a86e4b8e39f90..44a940f97b91dd8f701d699efa8224633f8d083c 100644 (file)
@@ -361,7 +361,7 @@ static int fix_attributes(struct ldb_context *ldb, const struct dsdb_schema *sch
 static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
 {
 
-       static const char * const attrs[] = { NULL };
+       const char * const attrs[] = { NULL };
 
        struct ldb_handle *h;
        struct oc_context *ac;
@@ -748,7 +748,7 @@ static int objectclass_search_self(struct ldb_handle *h)
 {
        int ret;
        struct oc_context *ac;
-       static const char * const attrs[] = { "objectClass", NULL };
+       const char * const attrs[] = { "objectClass", NULL };
 
        ac = talloc_get_type(h->private_data, struct oc_context);
 
@@ -865,7 +865,7 @@ static int objectclass_do_mod(struct ldb_handle *h) {
 static int objectclass_rename(struct ldb_module *module, struct ldb_request *req)
 {
 
-       static const char * const attrs[] = { NULL };
+       const char * const attrs[] = { NULL };
 
        struct ldb_handle *h;
        struct oc_context *ac;
index d139cc23a432c1a6b95cf2950f8f3feefe67ece1..03c2bbc7ae53b6dc317062a751efe04eab7e1aef 100644 (file)
@@ -1198,7 +1198,7 @@ static int build_domain_data_request(struct ph_context *ac)
        /* attrs[] is returned from this function in
           ac->dom_req->op.search.attrs, so it must be static, as
           otherwise the compiler can put it on the stack */
-       static const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
+       const char * const attrs[] = { "pwdProperties", "pwdHistoryLength", NULL };
        char *filter;
 
        ac->dom_req = talloc_zero(ac, struct ldb_request);
@@ -1662,7 +1662,7 @@ static int get_self_callback(struct ldb_context *ldb, void *context, struct ldb_
 static int password_hash_mod_search_self(struct ldb_handle *h) {
 
        struct ph_context *ac;
-       static const char * const attrs[] = { "userAccountControl", "lmPwdHistory", 
+       const char * const attrs[] = { "userAccountControl", "lmPwdHistory", 
                                              "ntPwdHistory", 
                                              "objectSid", "msDS-KeyVersionNumber", 
                                              "objectClass", "userPrincipalName",
index 0f3293ed1db7a58309e2a436d27466e9b00562a4..d27b0c12f79b0770f9220f0ba4ad7402fbe41e79 100644 (file)
@@ -37,7 +37,7 @@ static int pdc_fsmo_init(struct ldb_module *module)
        struct dsdb_pdc_fsmo *pdc_fsmo;
        struct ldb_result *pdc_res;
        int ret;
-       static const char *pdc_attrs[] = {
+       const char *pdc_attrs[] = {
                "fSMORoleOwner",
                NULL
        };
index affc01d41324086b018f02c5bf33aaf842f3300e..345b8b84407b22b424a52b271a21892ce978a031 100644 (file)
@@ -40,7 +40,7 @@ static int rr_search_callback(struct ldb_context *ldb, void *context, struct ldb
 {
        struct rr_context *rr_context = talloc_get_type(context, struct rr_context);
        struct ldb_request *orig_req = rr_context->orig_req;
-       int i, j, ret;
+       int i, j;
        
        if (ares->type != LDB_REPLY_ENTRY) {
                return rr_context->orig_req->callback(ldb, rr_context->orig_req->context, ares);
index 497ee373dea418fbfed69b0e00831209ea5b2253..b37ac49b28259ada2f91d26b18e78a37e8a3d6be 100644 (file)
@@ -1519,7 +1519,7 @@ static int replmd_replicated_uptodate_search_callback(struct ldb_context *ldb,
 static int replmd_replicated_uptodate_search(struct replmd_replicated_request *ar)
 {
        int ret;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "replUpToDateVector",
                "repsFrom",
                NULL
index 525193ac8c05e45d9ccd50efdc7903b7d296112d..5c7b72c12c0985e22127ec24bf57acc701fb79f8 100644 (file)
@@ -235,7 +235,7 @@ struct schema_attribute **schema_get_attrs_list(struct ldb_module *module,
 
 static int schema_init_attrs(struct ldb_module *module, struct schema_private_data *data)
 {
-       static const char *schema_attrs[] = {   "attributeID",
+       const char *schema_attrs[] = {  "attributeID",
                                                "lDAPDisplayName",
                                                "attributeSyntax",
                                                "oMSyntax",
@@ -1156,7 +1156,7 @@ static int schema_wait(struct ldb_handle *handle, enum ldb_wait_type type)
 
 static int schema_init(struct ldb_module *module)
 {
-       static const char *schema_attrs[] = { "schemaNamingContext", NULL };
+       const char *schema_attrs[] = { "schemaNamingContext", NULL };
        struct schema_private_data *data;
        struct ldb_result *res;
        int ret;
index 559c91bd2d863b5049d49851860da58a9ea58738..ade576ac99613944fe3ffd22c69eb295ad7821af 100644 (file)
@@ -46,7 +46,7 @@ static int schema_fsmo_init(struct ldb_module *module)
        struct ldb_result *c_res;
        uint32_t i;
        int ret;
-       static const char *schema_attrs[] = {
+       const char *schema_attrs[] = {
                "prefixMap",
                "schemaInfo",
                "fSMORoleOwner",
index 7efcccc9ffcac8af41a418ee33034705e47cbf42..a5a3ba6aef217df612a37d7b56c0bd6d239e2881 100644 (file)
@@ -752,7 +752,7 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
                     entryuuid_private->base_dns && 
                     entryuuid_private->base_dns[i];
                i++) {
-               static const char *contextCSN_attr[] = {
+               const char *contextCSN_attr[] = {
                        "contextCSN", NULL
                };
                search_req = talloc(req, struct ldb_request);
index f15b03c9b47a76a801958a460782456f8d3c49b9..3d17d2746e6224eed3338ca385f5b7af8bfa264f 100644 (file)
@@ -1062,7 +1062,7 @@ int dsdb_set_schema(struct ldb_context *ldb, struct dsdb_schema *schema)
 /**
  * Global variable to hold one copy of the schema, used to avoid memory bloat
  */
-static struct dsdb_schema *global_schema;
+static const struct dsdb_schema *global_schema;
 
 /**
  * Make this ldb use the 'global' schema, setup to avoid having multiple copies in this process
index 358ca5ad56d7162b2a083c38e127057b90035f87..a87371de25da3d7ca8147fd7aad17af63fef4a66 100644 (file)
@@ -726,7 +726,7 @@ _kdc_do_digest(krb5_context context,
        
            /* conf|int */
            if (strcmp(ireq.u.digestRequest.digest, "clear") != 0) {
-               static char conf_zeros[] = ":00000000000000000000000000000000";
+               const char conf_zeros[] = ":00000000000000000000000000000000";
                MD5_Update(&ctx, conf_zeros, sizeof(conf_zeros) - 1);
            }
            
index 87f791cb38795879f9283a03502083476b33e79f..ab4abe67014de9673b67a3f0f9c64e9369f46161 100644 (file)
@@ -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;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "rootDomainNamingContext",
                "configurationNamingContext",
                "schemaNamingContext",
index 39df427c2c2d3105fcdef8f09fde39c20b6503c4..87f5f25392b9194948688bc4fbcccddac299bb75 100644 (file)
@@ -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) 
 {
        
-       static const struct ldb_map_attribute objectclass_map = {
+       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 */
-       static const char * const attrs[] = { IS_MAPPED, NULL };
+       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)
 {
-       static const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
+       const char * const attrs[] = { MAP_DN_FROM, MAP_DN_TO, NULL };
        struct ldb_dn *dn;
        struct ldb_message *msg;
        struct ldb_result *res;
index 749858b49b3221ce8e48b647e3177588a284cd9b..69ce21936201975710d7c37f82bfb3074cb9ca7f 100644 (file)
@@ -407,7 +407,7 @@ static int check_supported_paged(struct ldb_context *ldb, void *context,
 
 static int ps_init(struct ldb_module *module)
 {
-       static const char *attrs[] = { "supportedControl", NULL };
+       const char *attrs[] = { "supportedControl", NULL };
        struct private_data *data;
        int ret;
        struct ldb_request *req;
index fb3d8e90c8afb977721f63bf658b7a697b32a7d8..1b84cda6f0ba400e331d6f8d319372eae618090b 100644 (file)
@@ -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)
 {
-       static const char *fmt = "%u.%u.%u.%u";
+       const char *fmt = "%u.%u.%u.%u";
        char tmp[sizeof "255.255.255.255"];
        size_t len;
 
index 80e4865ef494cdfaf6bdf81e822c23b56a1fe4e1..ea0fe6b78c62e40a26dc8cc196a88abf10da0141 100644 (file)
@@ -77,7 +77,7 @@ inet_pton4(src, dst)
        const char *src;
        unsigned char *dst;
 {
-       static const char digits[] = "0123456789";
+       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;
 {
-       static const char xdigits_l[] = "0123456789abcdef",
+       const char xdigits_l[] = "0123456789abcdef",
                          xdigits_u[] = "0123456789ABCDEF";
        unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
        const char *xdigits, *curtok;
index 395c684e11700431ed7a2eafec5a2dd307fb28c3..86f360bd3c53a7fa7c0a27944a3b17b9609872c3 100644 (file)
@@ -46,7 +46,7 @@ static int is_leap(unsigned y)
 
 time_t rep_timegm(struct tm *tm)
 {
-       static const unsigned ndays[2][12] ={
+       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;
index fd15ff2fc74a308734a088f6ff8aada5dd95c266..264a6b39eeb96c89e7a3ceb5b69fa0fb0249c5b0 100644 (file)
@@ -215,7 +215,7 @@ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
 
        const char **sasl_names;
        uint32_t old_gensec_features;
-       static const char *supported_sasl_mech_attrs[] = {
+       const char *supported_sasl_mech_attrs[] = {
                "supportedSASLMechanisms", 
                NULL 
        };
index 4d09422becb661bd67d04e17546b0faa95178947..576c86f3e65c817138a1a4ec89b0860c0c509b76 100644 (file)
@@ -809,7 +809,7 @@ static NTSTATUS becomeDC_ldap1_rootdse(struct libnet_BecomeDC_state *s)
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "*",
                NULL
        };
@@ -853,7 +853,7 @@ static NTSTATUS becomeDC_ldap1_crossref_behavior_version(struct libnet_BecomeDC_
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "msDs-Behavior-Version",
                NULL
        };
@@ -882,7 +882,7 @@ static NTSTATUS becomeDC_ldap1_domain_behavior_version(struct libnet_BecomeDC_st
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "msDs-Behavior-Version",
                NULL
        };
@@ -911,7 +911,7 @@ static NTSTATUS becomeDC_ldap1_schema_object_version(struct libnet_BecomeDC_stat
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "objectVersion",
                NULL
        };
@@ -940,7 +940,7 @@ static NTSTATUS becomeDC_ldap1_w2k3_update_revision(struct libnet_BecomeDC_state
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "revision",
                NULL
        };
@@ -976,19 +976,19 @@ static NTSTATUS becomeDC_ldap1_infrastructure_fsmo(struct libnet_BecomeDC_state
        struct ldb_dn *basedn;
        struct ldb_dn *ntds_dn;
        struct ldb_dn *server_dn;
-       static const char *_1_1_attrs[] = {
+       const char *_1_1_attrs[] = {
                "1.1",
                NULL
        };
-       static const char *fsmo_attrs[] = {
+       const char *fsmo_attrs[] = {
                "fSMORoleOwner",
                NULL
        };
-       static const char *dns_attrs[] = {
+       const char *dns_attrs[] = {
                "dnsHostName",
                NULL
        };
-       static const char *guid_attrs[] = {
+       const char *guid_attrs[] = {
                "objectGUID",
                NULL
        };
@@ -1074,19 +1074,19 @@ static NTSTATUS becomeDC_ldap1_rid_manager_fsmo(struct libnet_BecomeDC_state *s)
        const char *reference_dn_str;
        struct ldb_dn *ntds_dn;
        struct ldb_dn *server_dn;
-       static const char *rid_attrs[] = {
+       const char *rid_attrs[] = {
                "rIDManagerReference",
                NULL
        };
-       static const char *fsmo_attrs[] = {
+       const char *fsmo_attrs[] = {
                "fSMORoleOwner",
                NULL
        };
-       static const char *dns_attrs[] = {
+       const char *dns_attrs[] = {
                "dnsHostName",
                NULL
        };
-       static const char *guid_attrs[] = {
+       const char *guid_attrs[] = {
                "objectGUID",
                NULL
        };
@@ -1212,7 +1212,7 @@ static NTSTATUS becomeDC_ldap1_computer_object(struct libnet_BecomeDC_state *s)
        struct ldb_result *r;
        struct ldb_dn *basedn;
        char *filter;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "distinguishedName",
                "userAccountControl",
                NULL
@@ -1306,7 +1306,7 @@ static NTSTATUS becomeDC_ldap1_server_object_2(struct libnet_BecomeDC_state *s)
        struct ldb_result *r;
        struct ldb_dn *basedn;
        const char *server_reference_bl_dn_str;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "serverReferenceBL",
                NULL
        };
@@ -2852,7 +2852,7 @@ static NTSTATUS becomeDC_ldap2_move_computer(struct libnet_BecomeDC_state *s)
        struct ldb_dn *basedn;
        struct ldb_dn *old_dn;
        struct ldb_dn *new_dn;
-       static const char *_1_1_attrs[] = {
+       const char *_1_1_attrs[] = {
                "1.1",
                NULL
        };
index 415912e34dcd2573b832d43d31fbc0f8bfcd1ce3..1ab5645a98853d4ffcdd18d175dff4cf250d40b9 100644 (file)
@@ -326,7 +326,7 @@ static NTSTATUS unbecomeDC_ldap_rootdse(struct libnet_UnbecomeDC_state *s)
        int ret;
        struct ldb_result *r;
        struct ldb_dn *basedn;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "defaultNamingContext",
                "configurationNamingContext",
                NULL
@@ -370,7 +370,7 @@ static NTSTATUS unbecomeDC_ldap_computer_object(struct libnet_UnbecomeDC_state *
        struct ldb_result *r;
        struct ldb_dn *basedn;
        char *filter;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "distinguishedName",
                "userAccountControl",
                NULL
@@ -451,7 +451,7 @@ static NTSTATUS unbecomeDC_ldap_move_computer(struct libnet_UnbecomeDC_state *s)
        struct ldb_dn *basedn;
        struct ldb_dn *old_dn;
        struct ldb_dn *new_dn;
-       static const char *_1_1_attrs[] = {
+       const char *_1_1_attrs[] = {
                "1.1",
                NULL
        };
index a97b93a051a3bae29fb6931968f6843ca9091cf6..9142495a8aa5a0ffde543994ef6b5e2a119f39a3 100644 (file)
@@ -41,10 +41,10 @@ static WERROR dcesrv_drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_C
        struct GUID site_guid;
        struct ldb_result *site_res;
        struct ldb_dn *server_site_dn;
-       static const char *site_attrs[] = { "objectGUID", NULL };
+       const char *site_attrs[] = { "objectGUID", NULL };
        struct ldb_result *ntds_res;
        struct ldb_dn *ntds_dn;
-       static const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
+       const char *ntds_attrs[] = { "ms-DS-ReplicationEpoch", NULL };
        uint32_t u1;
        uint32_t repl_epoch;
        int ret;
index 03f360125766a3efdee58910a6a43b35188f2b43..a0bd34b1548437fa7ce2f9b63cec164d59201bb0 100644 (file)
@@ -749,7 +749,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        switch (r->in.level) {
        case 1: 
        {
-               static const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
+               const char * const attrs2[] = { "minPwdLength", "pwdHistoryLength",
                                                       "pwdProperties", "maxPwdAge",
                                                       "minPwdAge", NULL };
                attrs = attrs2;
@@ -757,7 +757,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 2:
        {
-               static const char * const attrs2[] = {"forceLogoff",
+               const char * const attrs2[] = {"forceLogoff",
                                                      "comment", 
                                                      "modifiedCount", 
                                                      "fSMORoleOwner",
@@ -767,14 +767,14 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 3:
        {
-               static const char * const attrs2[] = {"forceLogoff", 
+               const char * const attrs2[] = {"forceLogoff", 
                                                      NULL};
                attrs = attrs2;
                break;
        }
        case 4:
        {
-               static const char * const attrs2[] = {"comment", 
+               const char * const attrs2[] = {"comment", 
                                                      NULL};
                attrs = attrs2;
                break;
@@ -786,7 +786,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 6:
        {
-               static const char * const attrs2[] = {"fSMORoleOwner", 
+               const char * const attrs2[] = {"fSMORoleOwner", 
                                                      NULL};
                attrs = attrs2;
                break;
@@ -798,7 +798,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 8:
        {
-               static const char * const attrs2[] = { "modifiedCount", 
+               const char * const attrs2[] = { "modifiedCount", 
                                                       "creationTime", 
                                                       NULL };
                attrs = attrs2;
@@ -809,7 +809,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
                break;          
        case 11:
        {
-               static const char * const attrs2[] = { "comment", "forceLogoff", 
+               const char * const attrs2[] = { "comment", "forceLogoff", 
                                                       "modifiedCount", 
                                                       "lockoutDuration", 
                                                       "lockOutObservationWindow", 
@@ -820,7 +820,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 12:
        {
-               static const char * const attrs2[] = { "lockoutDuration", 
+               const char * const attrs2[] = { "lockoutDuration", 
                                                       "lockOutObservationWindow", 
                                                       "lockoutThreshold", 
                                                       NULL};
@@ -829,7 +829,7 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call,
        }
        case 13:
        {
-               static const char * const attrs2[] = { "modifiedCount", 
+               const char * const attrs2[] = { "modifiedCount", 
                                                       "creationTime", 
                                                       NULL };
                attrs = attrs2;
@@ -2944,7 +2944,7 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
        switch (r->in.level) {
        case 1:
        {
-               static const char * const attrs2[] = {"sAMAccountName", "displayName",
+               const char * const attrs2[] = {"sAMAccountName", "displayName",
                                                      "primaryGroupID", "description",
                                                      "comment", NULL};
                attrs = attrs2;
@@ -2952,13 +2952,13 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
        }
        case 2:
        {
-               static const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
+               const char * const attrs2[] = {"comment", "countryCode", "codePage", NULL};
                attrs = attrs2;
                break;
        }
        case 3:
        {
-               static const char * const attrs2[] = {"sAMAccountName",
+               const char * const attrs2[] = {"sAMAccountName",
                                                      "displayName",
                                                      "objectSid",
                                                      "primaryGroupID",
@@ -2979,13 +2979,13 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
        }
        case 4:
        {
-               static const char * const attrs2[] = {"logonHours", NULL};
+               const char * const attrs2[] = {"logonHours", NULL};
                attrs = attrs2;
                break;
        }
        case 5:
        {
-               static const char * const attrs2[] = {"sAMAccountName", 
+               const char * const attrs2[] = {"sAMAccountName", 
                                                      "displayName",
                                                      "objectSid",
                                                      "primaryGroupID",
@@ -3009,79 +3009,79 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
        }
        case 6:
        {
-               static const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
+               const char * const attrs2[] = {"sAMAccountName", "displayName", NULL};
                attrs = attrs2;
                break;
        }
        case 7:
        {
-               static const char * const attrs2[] = {"sAMAccountName", NULL};
+               const char * const attrs2[] = {"sAMAccountName", NULL};
                attrs = attrs2;
                break;
        }
        case 8:
        {
-               static const char * const attrs2[] = {"displayName", NULL};
+               const char * const attrs2[] = {"displayName", NULL};
                attrs = attrs2;
                break;
        }
        case 9:
        {
-               static const char * const attrs2[] = {"primaryGroupID", NULL};
+               const char * const attrs2[] = {"primaryGroupID", NULL};
                attrs = attrs2;
                break;
        }
        case 10:
        {
-               static const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
+               const char * const attrs2[] = {"homeDirectory", "homeDrive", NULL};
                attrs = attrs2;
                break;
        }
        case 11:
        {
-               static const char * const attrs2[] = {"scriptPath", NULL};
+               const char * const attrs2[] = {"scriptPath", NULL};
                attrs = attrs2;
                break;
        }
        case 12:
        {
-               static const char * const attrs2[] = {"profilePath", NULL};
+               const char * const attrs2[] = {"profilePath", NULL};
                attrs = attrs2;
                break;
        }
        case 13:
        {
-               static const char * const attrs2[] = {"description", NULL};
+               const char * const attrs2[] = {"description", NULL};
                attrs = attrs2;
                break;
        }
        case 14:
        {
-               static const char * const attrs2[] = {"userWorkstations", NULL};
+               const char * const attrs2[] = {"userWorkstations", NULL};
                attrs = attrs2;
                break;
        }
        case 16:
        {
-               static const char * const attrs2[] = {"userAccountControl", NULL};
+               const char * const attrs2[] = {"userAccountControl", NULL};
                attrs = attrs2;
                break;
        }
        case 17:
        {
-               static const char * const attrs2[] = {"accountExpires", NULL};
+               const char * const attrs2[] = {"accountExpires", NULL};
                attrs = attrs2;
                break;
        }
        case 20:
        {
-               static const char * const attrs2[] = {"userParameters", NULL};
+               const char * const attrs2[] = {"userParameters", NULL};
                attrs = attrs2;
                break;
        }
        case 21:
        {
-               static const char * const attrs2[] = {"lastLogon",
+               const char * const attrs2[] = {"lastLogon",
                                                      "lastLogoff",
                                                      "pwdLastSet",
                                                      "accountExpires",
index 34524cc0faba39a6670043892858a32b803cae85..4b0923216bd4455dc7843b0aaed7f29dbdfee511 100644 (file)
@@ -197,7 +197,7 @@ static int ejs_net_deleteuser(MprVarHandle eid, int argc, char **argv)
        }
        
        /* domain where the account is to be deleted */
-       userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
+       userman_domain = (const char*)mprGetThisPtr(eid, "domain");
        if (!userman_domain) {
                ejsSetErrorMsg(eid, "domain property returns null pointer");
                goto done;
@@ -260,7 +260,7 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
        }
        
        /* domain where the user account is to be queried */
-       userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain");
+       userman_domain = (const char *)mprGetThisPtr(eid, "domain");
        if (userman_domain == NULL) {
                ejsSetErrorMsg(eid, "domain property returns null pointer");
                return -1;
index 7bac04caf35b8540d315567f16006fa9d9529e8a..1f3018fc5e4d16c4429ccd7ba89b9cbe25ad2966 100644 (file)
@@ -47,7 +47,7 @@ static bool test_check_uptodatevector(struct torture_context *torture,
        struct ldb_result *r;
        const struct ldb_val *utdv_val1;
        struct replUpToDateVectorBlob utdv1;
-       static const char *attrs[] = {
+       const char *attrs[] = {
                "uSNChanged",
                "replUpToDateVector",
                "description",
index d96ed3e931e48a9ad39229b244d80ad095ae8fd3..f0e09c75da5e51ef97c4aea9a2d2807b48988793 100644 (file)
@@ -1008,7 +1008,7 @@ static bool test_wrepl_sgroup_merged(struct torture_context *tctx,
 static bool test_conflict_same_owner(struct torture_context *tctx, 
                                                                         struct test_wrepl_conflict_conn *ctx)
 {
-       static bool ret = true;
+       bool ret = true;
        struct nbt_name name;
        struct wrepl_wins_name wins_name1;
        struct wrepl_wins_name wins_name2;
index 371ddc729771d9e884de7a8666c0bf6cb0cb98b7..3c8976d8d0c2048d5bbc0fdf42f17462b6a5a16e 100644 (file)
@@ -517,13 +517,13 @@ int main(int argc,char *argv[])
        const struct torture_ui_ops *ui_ops;
        char **argv_new;
        poptContext pc;
-       static const char *target = "other";
+       const char *target = "other";
        NTSTATUS status;
        int shell = false;
-       static const char *ui_ops_name = "simple";
+       const char *ui_ops_name = "simple";
        const char *basedir = NULL;
        const char *extra_module = NULL;
-       static int list_tests = 0;
+       int list_tests = 0;
        enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS, OPT_LIST,
              OPT_DANGEROUS,OPT_SMB_PORTS,OPT_ASYNC,OPT_NUMPROGS};
        
index 3144fe91b1033e4b83b0dc0a87e230553c0e83e9..b85ddec7d0ee5a5699c3b3cc288a1541180ec250 100644 (file)
@@ -1048,7 +1048,7 @@ enum {
 
 int main(int argc, const char **argv)
 {
-       static const char *helper_protocol;
+       const char *helper_protocol;
        int opt;
 
        poptContext pc;
index a4ff5221866ec50e3a6b68e47d6a1dd0a782a0d1..718daae908aab8aac78730bbea4666510116147e 100644 (file)
@@ -172,18 +172,18 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
 
  int main(int argc, const char *argv[])
 {
-       static bool silent_mode = false;
+       bool silent_mode = false;
        int ret = 0;
        poptContext pc;
 /*
-       static int show_all_parameters = 0;
-       static char *new_local_machine = NULL;
+       int show_all_parameters = 0;
+       char *new_local_machine = NULL;
 */
-       static const char *section_name = NULL;
-       static char *parameter_name = NULL;
-       static const char *cname;
-       static const char *caddr;
-       static bool show_defaults = false;
+       const char *section_name = NULL;
+       char *parameter_name = NULL;
+       const char *cname = NULL;
+       const char *caddr = NULL;
+       bool show_defaults = false;
        struct loadparm_context *lp_ctx;
 
        struct poptOption long_options[] = {