ICU-5571 fix compilation error on AIX and HP-UX
X-SVN-Rev: 20991
diff --git a/source/test/intltest/idnaref.cpp b/source/test/intltest/idnaref.cpp
index 79f6367..1f45f8f 100644
--- a/source/test/intltest/idnaref.cpp
+++ b/source/test/intltest/idnaref.cpp
@@ -280,10 +280,15 @@
UBool srcIsLDH = TRUE;
int32_t j=0;
+ NamePrepTransform* prep = TestIDNA::getInstance(*status);
+
+ if(U_FAILURE(*status)){
+ goto CLEANUP;
+ }
+
if(srcLength == -1){
srcLength = u_strlen(src);
- }
-
+ }
if(srcLength > b1Capacity){
b1 = (UChar*) uprv_malloc(srcLength * U_SIZEOF_UCHAR);
if(b1==NULL){
@@ -301,11 +306,6 @@
b1[b1Len++] = src[j];
}
// step 2
- NamePrepTransform* prep = TestIDNA::getInstance(*status);
-
- if(U_FAILURE(*status)){
- goto CLEANUP;
- }
b1Len = prep->process(src,srcLength,b1, b1Capacity,allowUnassigned,parseError,*status);