aboutsummaryrefslogtreecommitdiff
path: root/lib/http_negotiate_sspi.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-07-05 22:16:15 +0200
committerYang Tse <yangsita@gmail.com>2012-07-05 22:18:11 +0200
commite77d8670685d38d80c940877a4fdfa3382c4d6cc (patch)
tree91b785d4fc38e8b741c62f8335b9a1bf5f5e7b1c /lib/http_negotiate_sspi.c
parent1b27bb446fad52d94a44d1d9bb5ee4b9c65d1e24 (diff)
unicode NTLM SSPI: cleanup
Reduce the number of #ifdef UNICODE directives used in source files.
Diffstat (limited to 'lib/http_negotiate_sspi.c')
-rw-r--r--lib/http_negotiate_sspi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
index f5e1fed73..5aa4f9433 100644
--- a/lib/http_negotiate_sspi.c
+++ b/lib/http_negotiate_sspi.c
@@ -207,13 +207,9 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
in_sec_buff.pvBuffer = input_token;
}
-#ifdef UNICODE
- sname = Curl_convert_UTF8_to_wchar(neg_ctx->server_name);
+ sname = Curl_convert_UTF8_to_tchar(neg_ctx->server_name);
if(!sname)
return CURLE_OUT_OF_MEMORY;
-#else
- sname = neg_ctx->server_name;
-#endif
neg_ctx->status = s_pSecFn->InitializeSecurityContext(
neg_ctx->credentials,
@@ -229,9 +225,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
&context_attributes,
&lifetime);
-#ifdef UNICODE
- free(sname);
-#endif
+ Curl_unicodefree(sname);
if(GSS_ERROR(neg_ctx->status))
return -1;