From be7a33df9d5106fb91c650d80dd0483a5105ba41 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 21 Dec 2014 19:12:56 +0000 Subject: warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@11561 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_secur.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index d8112927ae..688ffb1fc5 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -106,13 +106,10 @@ char* TNtlmAuth::getInitialRequest() return NULL; // This generates login method advertisement packet - char* result; if (info->conn.password[0] != 0) - result = Netlib_NtlmCreateResponse2(hProvider, "", info->conn.username, info->conn.password, &complete); - else - result = Netlib_NtlmCreateResponse2(hProvider, "", NULL, NULL, &complete); + return Netlib_NtlmCreateResponse2(hProvider, "", info->conn.username, info->conn.password, &complete); - return result; + return Netlib_NtlmCreateResponse2(hProvider, "", NULL, NULL, &complete); } char* TNtlmAuth::getChallenge(const TCHAR *challenge) @@ -120,14 +117,11 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) if (!hProvider) return NULL; - char *text = (!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result; + ptrA text((!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge)); if (info->conn.password[0] != 0) - result = Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete); - else - result = Netlib_NtlmCreateResponse2(hProvider, text, NULL, NULL, &complete); - - mir_free(text); - return result; + return Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete); + + return Netlib_NtlmCreateResponse2(hProvider, text, NULL, NULL, &complete); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3