summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-10 09:37:06 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-10 04:37:54 +0200
commit91f351568aab728269cdfce3a6cfad8b5785b8d8 (patch)
treef7c0fbad9719ff011d6244b2e5eae071a0291bf5 /source3/param
parent77c612fc21da944aa6c84e52c127713fcaf9a071 (diff)
downloadsamba-91f351568aab728269cdfce3a6cfad8b5785b8d8.tar.gz
samba-91f351568aab728269cdfce3a6cfad8b5785b8d8.tar.bz2
samba-91f351568aab728269cdfce3a6cfad8b5785b8d8.zip
s3-param Avoid strupper_m() where possible.
Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Jun 10 04:37:54 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 3ba5312454..c80b7517c9 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7135,10 +7135,14 @@ static void copy_service(struct service *pserviceDest, struct service *pserviceS
break;
case P_USTRING:
+ {
+ char *upper_string = strupper_talloc(talloc_tos(),
+ *(char **)src_ptr);
string_set((char **)dest_ptr,
- *(char **)src_ptr);
- strupper_m(*(char **)dest_ptr);
+ upper_string);
+ TALLOC_FREE(upper_string);
break;
+ }
case P_LIST:
TALLOC_FREE(*((char ***)dest_ptr));
*((char ***)dest_ptr) = str_list_copy(NULL,
@@ -8007,10 +8011,13 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
break;
case P_USTRING:
- string_set((char **)parm_ptr, pszParmValue);
- strupper_m(*(char **)parm_ptr);
+ {
+ char *upper_string = strupper_talloc(talloc_tos(),
+ pszParmValue);
+ string_set((char **)parm_ptr, upper_string);
+ TALLOC_FREE(upper_string);
break;
-
+ }
case P_ENUM:
lp_set_enum_parm( &parm_table[parmnum], pszParmValue, (int*)parm_ptr );
break;