ICU: fix use of un-init var
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Jan 2010 13:31:45 +0000 (14:31 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Jan 2010 13:31:45 +0000 (14:31 +0100)
util/zebramap.c

index 8af0c93..a1b9a79 100644 (file)
@@ -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)
             {