summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-09-05 19:59:55 +0000
committerJeremy Allison <jra@samba.org>2003-09-05 19:59:55 +0000
commit94f59f54921174fc156fade575ca114d331b1bd8 (patch)
tree06c2548e853c68c2bb24cce2ce3ba75eb3c8497e /source3/param
parent7544b0c77382e300da0e2daf2b325527a23e6ddc (diff)
downloadsamba-94f59f54921174fc156fade575ca114d331b1bd8.tar.gz
samba-94f59f54921174fc156fade575ca114d331b1bd8.tar.bz2
samba-94f59f54921174fc156fade575ca114d331b1bd8.zip
More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 3d0aebf230..c801c4c522 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1558,8 +1558,8 @@ static char *lp_string(const char *s)
lp_talloc = talloc_init("lp_talloc");
tmpstr = alloc_sub_basic(current_user_info.smb_name, s);
- if (trim_string(tmpstr, "\"", "\"")) {
- if (strchr(tmpstr,'"') != NULL) {
+ if (trim_char(tmpstr, '\"', '\"')) {
+ if (strchr(tmpstr,'\"') != NULL) {
SAFE_FREE(tmpstr);
tmpstr = alloc_sub_basic(current_user_info.smb_name,s);
}
@@ -3112,7 +3112,7 @@ BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
pstr_sprintf(param_key, "%s:", pszParmName);
slen = strlen(param_key);
pstrcat(param_key, sep+1);
- trim_string(param_key+slen, " ", " ");
+ trim_char(param_key+slen, ' ', ' ');
not_added = True;
data = (snum < 0) ? Globals.param_opt :
ServicePtrs[snum]->param_opt;