summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-04-24 20:20:25 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-04-24 20:20:25 +0000
commit01ff89b58bc1eac22166bcf583d3af3c50131b6d (patch)
tree34d8d8fcfb36595be02955fc9d9bf600a610af73 /source3
parentbca6ff183c9431dc52c122e97c6060dae82e1464 (diff)
downloadsamba-01ff89b58bc1eac22166bcf583d3af3c50131b6d.tar.gz
samba-01ff89b58bc1eac22166bcf583d3af3c50131b6d.tar.bz2
samba-01ff89b58bc1eac22166bcf583d3af3c50131b6d.zip
Get rid of module_path_get_name()
(This used to be commit 9f9bdd97dbbabde7b2979c62dfdf150fae8670ec)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/iconv.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index 9240e24074..906c831335 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -66,12 +66,9 @@ static struct charset_functions *charsets = NULL;
static struct charset_functions *find_charset_functions(const char *name)
{
struct charset_functions *c = charsets;
- pstring stripped;
- module_path_get_name(name, stripped);
-
while(c) {
- if (strcasecmp(stripped, c->name) == 0) {
+ if (strcasecmp(name, c->name) == 0) {
return c;
}
c = c->next;
@@ -86,12 +83,10 @@ BOOL smb_register_charset(struct charset_functions *funcs)
DEBUG(5, ("Attempting to register new charset %s\n", funcs->name));
/* Check whether we already have this charset... */
- while(c) {
- if(!strcasecmp(c->name, funcs->name)){
- DEBUG(2, ("Duplicate charset %s, not registering\n", funcs->name));
- return False;
- }
- c = c->next;
+
+ if (find_charset_functions(funcs->name)) {
+ DEBUG(2, ("Duplicate charset %s, not registering\n", funcs->name));
+ return False;
}
funcs->next = funcs->prev = NULL;