diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-09-27 17:37:53 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-09-27 17:37:53 +0200 |
commit | d9ada600cc81603300a0cfce75179c6aa1ac94cc (patch) | |
tree | 3d7dc80587be662a886aed0a643762c4574aac92 /source4/param/generic.c | |
parent | 43267812e17cc7749bb9275574af5eccc74129e5 (diff) | |
download | samba-d9ada600cc81603300a0cfce75179c6aa1ac94cc.tar.gz samba-d9ada600cc81603300a0cfce75179c6aa1ac94cc.tar.xz samba-d9ada600cc81603300a0cfce75179c6aa1ac94cc.zip |
parmlist: Add more tests.
Diffstat (limited to 'source4/param/generic.c')
-rw-r--r-- | source4/param/generic.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/param/generic.c b/source4/param/generic.c index 802f90764c..41d01de9d3 100644 --- a/source4/param/generic.c +++ b/source4/param/generic.c @@ -92,16 +92,14 @@ const char *param_get_string(struct param_context *ctx, const char *param, const return parmlist_get_string(section->parameters, param, NULL); } -int param_set_string(struct param_context *ctx, const char *param, const char *value, const char *section) +int param_set_string(struct param_context *ctx, const char *param, const char *value, const char *section_name) { - struct parmlist_entry *p = param_get_add(ctx, param, section); + struct param_section *section = param_get_section(ctx, section_name); - if (p == NULL) + if (section == NULL) return -1; - p->value = talloc_strdup(p, value); - - return 0; + return parmlist_set_string(section->parameters, param, value); } const char **param_get_string_list(struct param_context *ctx, const char *param, const char *separator, const char *section_name) |