diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-22 07:04:19 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-22 07:04:19 +0000 |
commit | 9aecf7128f09f8fdda28931ce44200a4b92b8e39 (patch) | |
tree | e4a17fe506d8a733186c0b8489e7592acffb8d57 /protocols/VKontakte | |
parent | 5b530fc9d8dc47641985456908703eaa03b7c88d (diff) |
VKontakte:
rand/srand => Utils_GetRandom
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/stdafx.cxx | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_files.cpp | 6 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 2 |
8 files changed, 10 insertions, 12 deletions
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 7974618a9b..861d9d7d5b 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -91,4 +91,4 @@ extern "C" int __declspec(dllexport) Load() extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
-}
+}
\ No newline at end of file diff --git a/protocols/VKontakte/src/stdafx.cxx b/protocols/VKontakte/src/stdafx.cxx index 8eeef1c17d..e48a8fd511 100644 --- a/protocols/VKontakte/src/stdafx.cxx +++ b/protocols/VKontakte/src/stdafx.cxx @@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdafx.h"
+#include "stdafx.h"
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index f4f4153a46..3ffe6bc7fb 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -91,4 +91,4 @@ HANDLE GetIconHandle(int iCommand); char* ExpUrlEncode(const char *szUrl, bool strict = false);
bool IsEmpty(TCHAR *str);
-bool IsEmpty(char *str);
+bool IsEmpty(char *str);
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index 180b8999e3..2331c389a1 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -201,8 +201,8 @@ void CVkProto::OnReciveUploadServer(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * CMStringA FNamePart = fup->fileName();
// Boundary
- srand(time(NULL));
- int iboundary = rand();
+ int iboundary;
+ Utils_GetRandom(&iboundary, sizeof(iboundary));
boundary.AppendFormat("Miranda%dNG%d", iboundary, time(NULL));
// Header
header.AppendFormat("multipart/form-data; boundary=%s", boundary);
@@ -375,4 +375,4 @@ void CVkProto::OnReciveUploadFile(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR pMsgReq->pUserInfo = new CVkSendMsgParam(fup->hContact, -1, (int)pReq->pUserInfo);
Push(pMsgReq);
-}
+}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index ee41e1768c..cbf42c6c2f 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -335,6 +335,4 @@ void CVkProto::OnReceiveDlgs(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) }
}
RetrieveUsersInfo();
-}
-
-
+}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index a21e27105e..8b5621fa6c 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -656,4 +656,4 @@ int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = &CVkProto::OptionsViewProc;
Options_AddPage(wParam, &odp);
return 0;
-}
+}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index b0945d5525..61c372f5a9 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -622,4 +622,4 @@ int CVkProto::GetInfo(MCONTACT hContact, int) return 1;
RetrieveUserInfo(userID);
return 0;
-}
+}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 683dafdc86..5eb8ae1fc2 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -183,4 +183,4 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest *pReq, const TCHAR_PARAM ¶m) s.AppendChar('&');
s.AppendFormat("%s=%s", param.szName, ptrA(pReq->bExpUrlEncode ? ExpUrlEncode(szValue) : mir_urlEncode(szValue)));
return pReq;
-}
+}
\ No newline at end of file |