From 94f59f54921174fc156fade575ca114d331b1bd8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Sep 2003 19:59:55 +0000 Subject: 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) --- source3/param/loadparm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/param') 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; -- cgit