summaryrefslogtreecommitdiffstats
path: root/source/nmbd
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
commitf35e9a8b909d3c74be47083ccc4a4e91a14938db (patch)
tree94bec8e4eb1017cd886adae1518c8ffe2d47ee4f /source/nmbd
parent3913e43724870c62a0d77ec3e73cbe9480cb6247 (diff)
downloadsamba-f35e9a8b909d3c74be47083ccc4a4e91a14938db.tar.gz
samba-f35e9a8b909d3c74be47083ccc4a4e91a14938db.tar.xz
samba-f35e9a8b909d3c74be47083ccc4a4e91a14938db.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.
Diffstat (limited to 'source/nmbd')
-rw-r--r--source/nmbd/nmbd_browsesync.c4
-rw-r--r--source/nmbd/nmbd_serverlistdb.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/nmbd/nmbd_browsesync.c b/source/nmbd/nmbd_browsesync.c
index 96e8fd1b815..6cde88651f9 100644
--- a/source/nmbd/nmbd_browsesync.c
+++ b/source/nmbd/nmbd_browsesync.c
@@ -204,7 +204,7 @@ static void domain_master_node_status_success(struct subnet_record *subrec,
pull_ascii_nstring(qname, p);
name_type = CVAL(p,15);
nb_flags = get_nb_flags(&p[16]);
- trim_string(qname,NULL," ");
+ trim_char(qname,'\0',' ');
p += 18;
@@ -427,7 +427,7 @@ static void get_domain_master_name_node_status_success(struct subnet_record *sub
pull_ascii_nstring(qname, p);
name_type = CVAL(p,15);
nb_flags = get_nb_flags(&p[16]);
- trim_string(qname,NULL," ");
+ trim_char(qname,'\0',' ');
p += 18;
diff --git a/source/nmbd/nmbd_serverlistdb.c b/source/nmbd/nmbd_serverlistdb.c
index a5008f803b4..cdb1089a54f 100644
--- a/source/nmbd/nmbd_serverlistdb.c
+++ b/source/nmbd/nmbd_serverlistdb.c
@@ -328,7 +328,7 @@ void write_browse_list(time_t t, BOOL force_write)
updatecount++;
pstrcpy(fname,lp_lockdir());
- trim_string(fname,NULL,"/");
+ trim_char(fname,'\0' ,'/');
pstrcat(fname,"/");
pstrcat(fname,SERVER_LIST);
pstrcpy(fnamenew,fname);