aboutsummaryrefslogtreecommitdiff
path: root/lib/http_ntlm.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-05-23 16:55:09 +0200
committerYang Tse <yangsita@gmail.com>2011-05-23 16:55:09 +0200
commit30c9799f72f3275f806a296e1100ad04c942706c (patch)
treed1903198168db0506d4bf08f2e7ea8ff54115382 /lib/http_ntlm.c
parentbed6b89a2fb4f8a1279adc6a8f823b3e2d8a726f (diff)
compiler warning: fix
Fix compiler warning: expression has no effect
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r--lib/http_ntlm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index d99aa1172..b0b49253f 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -512,6 +512,7 @@ static void mk_lm_hash(struct SessionHandle *data,
const char *password,
unsigned char *lmbuffer /* 21 bytes */)
{
+ CURLcode res;
unsigned char pw[14];
static const unsigned char magic[] = {
0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
@@ -525,7 +526,8 @@ static void mk_lm_hash(struct SessionHandle *data,
* The LanManager hashed password needs to be created using the
* password in the network encoding not the host encoding.
*/
- if(Curl_convert_to_network(data, (char *)pw, 14))
+ res = Curl_convert_to_network(data, (char *)pw, 14);
+ if(res)
return;
{
@@ -947,6 +949,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
SECURITY_STATUS status;
ULONG attrs;
TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
+ CURLcode res;
type_2_desc.ulVersion = type_3_desc.ulVersion = SECBUFFER_VERSION;
type_2_desc.cBuffers = type_3_desc.cBuffers = 1;
@@ -1265,8 +1268,9 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
size += hostlen;
/* convert domain, user, and host to ASCII but leave the rest as-is */
- if(Curl_convert_to_network(conn->data, (char *)&ntlmbuf[domoff],
- size-domoff))
+ res = Curl_convert_to_network(conn->data, (char *)&ntlmbuf[domoff],
+ size-domoff)
+ if(res)
return CURLE_CONV_FAILED;
#endif