unicode NTLM SSPI: cleanup

Reduce the number of #ifdef UNICODE directives used in source files.
This commit is contained in:
Yang Tse
2012-07-05 22:16:15 +02:00
parent 1b27bb446f
commit e77d867068
10 changed files with 195 additions and 162 deletions

View File

@@ -49,10 +49,9 @@ int curl_win32_idn_to_ascii(const char *in, char **out)
}
free(in_w);
*out = (char *)Curl_convert_wchar_to_UTF8(punycode);
if(!(*out)) {
*out = Curl_convert_wchar_to_UTF8(punycode);
if(!*out)
return 0;
}
}
return 1;
}
@@ -67,10 +66,9 @@ int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8)
return 0;
}
else {
const char *out_utf8 = Curl_convert_wchar_to_UTF8(unicode);
if(!out_utf8) {
*out_utf8 = Curl_convert_wchar_to_UTF8(unicode);
if(!*out_utf8)
return 0;
}
}
}
return 1;