summaryrefslogtreecommitdiff
path: root/source/lib/charset
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-30 23:15:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:14 -0500
commit9647f860bdd5c0a74583e886182bd041a45e7655 (patch)
tree2521c336fe778bae25b82fd1b2d95b5b65ca2032 /source/lib/charset
parentff6684adfd96b59381dd941e54070ab9f8984912 (diff)
downloadsamba-9647f860bdd5c0a74583e886182bd041a45e7655.tar.gz
r24814: Fix headers, trim core.h even more.
Diffstat (limited to 'source/lib/charset')
-rw-r--r--source/lib/charset/charset.h2
-rw-r--r--source/lib/charset/iconv.c13
2 files changed, 7 insertions, 8 deletions
diff --git a/source/lib/charset/charset.h b/source/lib/charset/charset.h
index 3c548192b63..6943a601826 100644
--- a/source/lib/charset/charset.h
+++ b/source/lib/charset/charset.h
@@ -21,7 +21,7 @@
#ifndef __CHARSET_H__
#define __CHARSET_H__
-#include "lib/talloc/talloc.h"
+#include <talloc.h>
/* this defines the charset types used in samba */
typedef enum {CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4, CH_UTF16BE=5} charset_t;
diff --git a/source/lib/charset/iconv.c b/source/lib/charset/iconv.c
index 4eda585d4e6..062b4ddfc86 100644
--- a/source/lib/charset/iconv.c
+++ b/source/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