summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_search.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-12-05 07:53:53 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-12-05 07:53:53 +0000
commit9fca9c4c344cb330434e9e72e7934e207bcfaa4d (patch)
tree6155df657ec8e5171d4ae7544154829be3a8824e /protocols/VKontakte/src/vk_search.cpp
parent8a3ea13f4390d4b5040a7bb13cbda2c93e7493ea (diff)
VKontakte: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11248 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_search.cpp')
-rw-r--r--protocols/VKontakte/src/vk_search.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index 2acfaedd1e..ee756ada51 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -93,8 +93,8 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
{
PROTOSEARCHBYNAME *pParam = (PROTOSEARCHBYNAME *)pReq->pUserInfo;
debugLogA("CVkProto::OnSearch %d", reply->resultCode);
- if (reply->resultCode != 200){
- if (pParam){
+ if (reply->resultCode != 200) {
+ if (pParam) {
mir_free(pParam->pszFirstName);
mir_free(pParam->pszLastName);
mir_free(pParam->pszNick);
@@ -106,8 +106,8 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
JSONROOT pRoot;
JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
- if (pResponse == NULL){
- if (pParam){
+ if (pResponse == NULL) {
+ if (pParam) {
mir_free(pParam->pszFirstName);
mir_free(pParam->pszLastName);
mir_free(pParam->pszNick);
@@ -119,7 +119,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
int iCount = json_as_int(json_get(pResponse, "count"));
JSONNODE *pItems = json_get(pResponse, "items");
- if (!pItems){
+ if (!pItems) {
pItems = pResponse;
iCount = 1;
}
@@ -140,7 +140,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
psr.nick = mir_wstrdup(json_as_string(json_get(pRecord, "domain")));
bool filter = true;
- if (pParam){
+ if (pParam) {
if (psr.firstName&&pParam->pszFirstName)
filter = tlstrstr(psr.firstName, pParam->pszFirstName) && filter;
if (psr.lastName&&pParam->pszLastName)
@@ -154,7 +154,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
}
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- if (pParam){
+ if (pParam) {
mir_free(pParam->pszFirstName);
mir_free(pParam->pszLastName);
mir_free(pParam->pszNick);
@@ -165,20 +165,20 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
{
debugLogA("CVkProto::OnSearch %d", reply->resultCode);
- if (reply->resultCode != 200){
+ if (reply->resultCode != 200) {
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
return;
}
JSONROOT pRoot;
JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
- if (pResponse == NULL){
+ if (pResponse == NULL) {
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
return;
}
JSONNODE *pItems = json_get(pResponse, "found");
- if (!pItems){
+ if (!pItems) {
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
return;
}