summaryrefslogtreecommitdiffstats
path: root/source4/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
commit82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8 (patch)
tree0bf7585bb48057b24bf16a9e3ec9e654a9fdffc2 /source4/lib/charset
parent09c188e7353a74d05a674935c85e548bd09073ae (diff)
downloadsamba-82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8.tar.gz
samba-82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8.tar.xz
samba-82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8.zip
r24814: Fix headers, trim core.h even more.
(This used to be commit 9647f860bdd5c0a74583e886182bd041a45e7655)
Diffstat (limited to 'source4/lib/charset')
-rw-r--r--source4/lib/charset/charset.h2
-rw-r--r--source4/lib/charset/iconv.c13
2 files changed, 7 insertions, 8 deletions
diff --git a/source4/lib/charset/charset.h b/source4/lib/charset/charset.h
index 3c548192b63..6943a601826 100644
--- a/source4/lib/charset/charset.h
+++ b/source4/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/source4/lib/charset/iconv.c b/source4/lib/charset/iconv.c
index 4eda585d4e6..062b4ddfc86 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