summaryrefslogtreecommitdiff
path: root/source3/lib/charcnv.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-07-27 02:40:06 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-07-27 02:40:06 +0000
commit4b3e0268b56042eb72108dbca75ac0bb0aff2514 (patch)
treee9f088a48e1538a93b422f8d91c3be9ff755639d /source3/lib/charcnv.c
parent455bb6de903ca3950d965b29190c09f116d91889 (diff)
downloadsamba-4b3e0268b56042eb72108dbca75ac0bb0aff2514.tar.gz
samba-4b3e0268b56042eb72108dbca75ac0bb0aff2514.tar.bz2
samba-4b3e0268b56042eb72108dbca75ac0bb0aff2514.zip
Use push_ucs2_allocate(), rather than convert_string_allocate() directly.
Remove strdup_upper/strdup_lower from their old file, now that they have been moved to charcnv.c Note that string_replace assumes that s is a pstring. (doco change only) Andrew Bartlett (This used to be commit 6c9056029bb3dfadb244f301598e12e69493fff9)
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r--source3/lib/charcnv.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 8896f0b886..ca5e378970 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -343,16 +343,14 @@ char *strdup_upper(const char *s)
smb_ucs2_t *buffer;
char *out_buffer;
- size = convert_string_allocate(CH_UNIX, CH_UCS2, s, strlen(s)+1,
- (void **) &buffer);
+ size = push_ucs2_allocate(&buffer, s);
if (size == -1) {
return NULL;
}
strupper_w(buffer);
- size = convert_string_allocate(CH_UCS2, CH_UNIX, buffer, size,
- (void **) &out_buffer);
+ size = pull_ucs2_allocate(&out_buffer, buffer);
SAFE_FREE(buffer);
if (size == -1) {
@@ -391,16 +389,14 @@ char *strdup_lower(const char *s)
smb_ucs2_t *buffer;
char *out_buffer;
- size = convert_string_allocate(CH_UNIX, CH_UCS2, s, strlen(s),
- (void **) &buffer);
+ size = push_ucs2_allocate(&buffer, s);
if (size == -1) {
return NULL;
}
strlower_w(buffer);
- size = convert_string_allocate(CH_UCS2, CH_UNIX, buffer, size,
- (void **) &out_buffer);
+ size = pull_ucs2_allocate(&out_buffer, buffer);
SAFE_FREE(buffer);
if (size == -1) {