From 82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 30 Aug 2007 23:15:12 +0000 Subject: r24814: Fix headers, trim core.h even more. (This used to be commit 9647f860bdd5c0a74583e886182bd041a45e7655) --- source4/lib/charset/iconv.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source4/lib/charset/iconv.c') diff --git a/source4/lib/charset/iconv.c b/source4/lib/charset/iconv.c index 4eda585d4e..062b4ddfc8 100644 --- a/source4/lib/charset/iconv.c +++ b/source4/lib/charset/iconv.c @@ -72,23 +72,22 @@ static const struct charset_functions builtin_functions[] = { static struct charset_functions *charsets = NULL; -NTSTATUS charset_register_backend(const void *_funcs) +bool charset_register_backend(const void *_funcs) { struct charset_functions *funcs = memdup(_funcs,sizeof(struct charset_functions)); - struct charset_functions *c = charsets; + struct charset_functions *c; /* Check whether we already have this charset... */ - while(c) { - if(!strcasecmp(c->name, funcs->name)){ + for (c = charsets; c != NULL; c = c->next) { + if(!strcasecmp(c->name, funcs->name)) { DEBUG(2, ("Duplicate charset %s, not registering\n", funcs->name)); - return NT_STATUS_OBJECT_NAME_COLLISION; + return false; } - c = c->next; } funcs->next = funcs->prev = NULL; DLIST_ADD(charsets, funcs); - return NT_STATUS_OK; + return true; } #ifdef HAVE_NATIVE_ICONV -- cgit