From 8fcb70c581b7f0b1138414b5aaab69205871ccd3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 22 Jan 2010 14:31:45 +0100 Subject: [PATCH] ICU: fix use of un-init var --- util/zebramap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/util/zebramap.c b/util/zebramap.c index 8af0c93..a1b9a79 100644 --- a/util/zebramap.c +++ b/util/zebramap.c @@ -698,6 +698,9 @@ int zebra_map_tokenize_next(zebra_map_t zm, int zebra_map_tokenize_start(zebra_map_t zm, const char *buf, size_t len) { +#if YAZ_HAVE_ICU + int ret; +#endif assert(zm->use_chain); wrbuf_rewind(zm->input_str); @@ -716,10 +719,9 @@ int zebra_map_tokenize_start(zebra_map_t zm, yaz_log(YLOG_LOG, "input %s", wrbuf_cstr(zm->print_str)); } - icu_chain_assign_cstr(zm->icu_chain, - wrbuf_cstr(zm->input_str), - &status); - if (!U_SUCCESS(status)) + ret = icu_chain_assign_cstr(zm->icu_chain, + wrbuf_cstr(zm->input_str), &status); + if (!ret && !U_SUCCESS(status)) { if (zm->debug) { -- 1.7.10.4