summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-20 15:00:27 +1300
committerJeremy Allison <jra@samba.org>2014-05-07 19:49:15 +0200
commit47c431279eed8d27ad6a49b1e5a1749ce110ead2 (patch)
tree66223e0945d00f1c8d7295eede1ebf1fc19425a9
parent8abbfa9fc9c4af62bbea15c56abeae89905b1b94 (diff)
downloadsamba-47c431279eed8d27ad6a49b1e5a1749ce110ead2.tar.gz
samba-47c431279eed8d27ad6a49b1e5a1749ce110ead2.tar.xz
samba-47c431279eed8d27ad6a49b1e5a1749ce110ead2.zip
param: use a single init_copymap method in lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--lib/param/loadparm.c3
-rw-r--r--source3/param/loadparm.c22
2 files changed, 1 insertions, 24 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 356c5c4ac8..d2c9d0015f 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -280,7 +280,6 @@ static struct loadparm_service *lpcfg_getservicebyname(struct loadparm_context *
const char *pszServiceName);
static bool lpcfg_service_ok(struct loadparm_service *service);
static bool do_section(const char *pszSectionName, void *);
-static void init_copymap(struct loadparm_service *pservice);
/* This is a helper function for parametrical options support. */
/* It returns a pointer to parametrical option value if it exists or NULL otherwise */
@@ -1203,7 +1202,7 @@ bool handle_logfile(struct loadparm_context *lp_ctx, int unused,
Initialise a copymap.
***************************************************************************/
-static void init_copymap(struct loadparm_service *pservice)
+void init_copymap(struct loadparm_service *pservice)
{
int i;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 523bf92d20..b206f6be7a 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1178,7 +1178,6 @@ static int getservicebyname(const char *pszServiceName,
static bool do_parameter(const char *pszParmName, const char *pszParmValue,
void *userdata);
static bool do_section(const char *pszSectionName, void *userdata);
-static void init_copymap(struct loadparm_service *pservice);
static bool hash_a_service(const char *name, int number);
static void free_service_byindex(int iService);
static void show_parameter(int parmIndex);
@@ -2776,27 +2775,6 @@ static bool handle_printing(struct loadparm_context *unused, int snum, const cha
return true;
}
-
-/***************************************************************************
- Initialise a copymap.
-***************************************************************************/
-
-static void init_copymap(struct loadparm_service *pservice)
-{
- int i;
-
- TALLOC_FREE(pservice->copymap);
-
- pservice->copymap = bitmap_talloc(NULL, NUMPARAMETERS);
- if (!pservice->copymap)
- DEBUG(0,
- ("Couldn't allocate copymap!! (size %d)\n",
- (int)NUMPARAMETERS));
- else
- for (i = 0; i < NUMPARAMETERS; i++)
- bitmap_set(pservice->copymap, i);
-}
-
/**
return the parameter pointer for a parameter
*/