summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf/smbconf_txt_simple.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-07 15:05:33 +0200
committerMichael Adam <obnox@samba.org>2008-04-10 01:28:55 +0200
commit77fce35417f54e9a8edfb88c5e2cf177a543cb8f (patch)
tree14c4ce8f92d3a0249d0515f8ddb3bd888ec44971 /source3/lib/smbconf/smbconf_txt_simple.c
parent36ede8ae549837452bbd577e43cda8d84ee22c4b (diff)
downloadsamba-77fce35417f54e9a8edfb88c5e2cf177a543cb8f.tar.gz
samba-77fce35417f54e9a8edfb88c5e2cf177a543cb8f.tar.bz2
samba-77fce35417f54e9a8edfb88c5e2cf177a543cb8f.zip
libsmbconf: rename smbconf_txt_find_in_array() to smbconf_find_in_array()
Michael (This used to be commit 9890f437264c6acc8c61c430a53c4645e0a12959)
Diffstat (limited to 'source3/lib/smbconf/smbconf_txt_simple.c')
-rw-r--r--source3/lib/smbconf/smbconf_txt_simple.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c
index df33008608..3972b319a7 100644
--- a/source3/lib/smbconf/smbconf_txt_simple.c
+++ b/source3/lib/smbconf/smbconf_txt_simple.c
@@ -56,8 +56,8 @@ static struct txt_private_data *pd(struct smbconf_ctx *ctx)
return (struct txt_private_data *)(ctx->data);
}
-static bool smbconf_txt_find_in_array(const char *string, char **list,
- uint32_t num_entries, uint32_t *entry)
+static bool smbconf_find_in_array(const char *string, char **list,
+ uint32_t num_entries, uint32_t *entry)
{
uint32_t i;
@@ -83,8 +83,8 @@ static bool smbconf_txt_do_section(const char *section, void *private_data)
uint32_t idx;
struct txt_cache *cache = (struct txt_cache *)private_data;
- if (smbconf_txt_find_in_array(section, cache->share_names,
- cache->num_shares, &idx))
+ if (smbconf_find_in_array(section, cache->share_names,
+ cache->num_shares, &idx))
{
cache->current_share = idx;
return true;
@@ -147,8 +147,7 @@ static bool smbconf_txt_do_parameter(const char *param_name,
param_values = cache->param_values[cache->current_share];
num_params = cache->num_params[cache->current_share];
- if (smbconf_txt_find_in_array(param_name, param_names, num_params,
- &idx))
+ if (smbconf_find_in_array(param_name, param_names, num_params, &idx))
{
TALLOC_FREE(param_values[idx]);
param_values[idx] = talloc_strdup(cache, param_value);
@@ -358,9 +357,9 @@ static bool smbconf_txt_share_exists(struct smbconf_ctx *ctx,
return false;
}
- return smbconf_txt_find_in_array(servicename,
- pd(ctx)->cache->share_names,
- pd(ctx)->cache->num_shares, NULL);
+ return smbconf_find_in_array(servicename,
+ pd(ctx)->cache->share_names,
+ pd(ctx)->cache->num_shares, NULL);
}
/**
@@ -393,10 +392,10 @@ static WERROR smbconf_txt_get_share(struct smbconf_ctx *ctx,
return werr;
}
- found = smbconf_txt_find_in_array(servicename,
- pd(ctx)->cache->share_names,
- pd(ctx)->cache->num_shares,
- &sidx);
+ found = smbconf_find_in_array(servicename,
+ pd(ctx)->cache->share_names,
+ pd(ctx)->cache->num_shares,
+ &sidx);
if (!found) {
return WERR_NO_SUCH_SERVICE;
}
@@ -476,18 +475,18 @@ static WERROR smbconf_txt_get_parameter(struct smbconf_ctx *ctx,
return werr;
}
- found = smbconf_txt_find_in_array(service,
- pd(ctx)->cache->share_names,
- pd(ctx)->cache->num_shares,
- &share_index);
+ found = smbconf_find_in_array(service,
+ pd(ctx)->cache->share_names,
+ pd(ctx)->cache->num_shares,
+ &share_index);
if (!found) {
return WERR_NO_SUCH_SERVICE;
}
- found = smbconf_txt_find_in_array(param,
- pd(ctx)->cache->param_names[share_index],
- pd(ctx)->cache->num_params[share_index],
- &param_index);
+ found = smbconf_find_in_array(param,
+ pd(ctx)->cache->param_names[share_index],
+ pd(ctx)->cache->num_params[share_index],
+ &param_index);
if (!found) {
return WERR_INVALID_PARAM;
}