From: Adam Dickmeiss Date: Fri, 22 Jan 2010 13:31:45 +0000 (+0100) Subject: ICU: fix use of un-init var X-Git-Tag: v2.0.44~11^2~6 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=8fcb70c581b7f0b1138414b5aaab69205871ccd3;p=idzebra-moved-to-github.git ICU: fix use of un-init var --- 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) {