git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1603fd9
)
r7898: don't die on bad iconv libs in LOCAL-ICONV test
author
Andrew Tridgell
<tridge@samba.org>
Sat, 25 Jun 2005 04:48:20 +0000
(
04:48
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:18:47 +0000
(13:18 -0500)
(This used to be commit
fe7055df94ecc81d6758ee7ff82534451d620d6a
)
source4/torture/local/iconv.c
patch
|
blob
|
history
diff --git
a/source4/torture/local/iconv.c
b/source4/torture/local/iconv.c
index e9dc3e16f80de673c1800404078175fe77a6222e..e61d3348eb89e2d5465aab643792c5ff78670131 100644
(file)
--- a/
source4/torture/local/iconv.c
+++ b/
source4/torture/local/iconv.c
@@
-38,6
+38,10
@@
static int gen_codepoint_utf16(unsigned int codepoint,
size_t size_in, size_out, ret;
if (!cd) {
cd = iconv_open("UTF-16LE", "UCS-4LE");
+ if (cd == (iconv_t)-1) {
+ cd = NULL;
+ return -1;
+ }
}
in[0] = codepoint & 0xFF;
@@
-123,6
+127,10
@@
static int test_buffer(uint8_t *inbuf, size_t size, const char *charset)
if (!cd) {
cd = iconv_open(charset, "UTF-16LE");
+ if (cd == (iconv_t)-1) {
+ cd = NULL;
+ return 0;
+ }
cd2 = smb_iconv_open(charset, "UTF-16LE");
cd3 = smb_iconv_open("UTF-16LE", charset);
last_charset = charset;