summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/svcs_proto.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/MirOTR/src/svcs_proto.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/MirOTR/src/svcs_proto.cpp')
-rw-r--r--plugins/MirOTR/src/svcs_proto.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp
index 4dd0ca4f59..147d79b1e7 100644
--- a/plugins/MirOTR/src/svcs_proto.cpp
+++ b/plugins/MirOTR/src/svcs_proto.cpp
@@ -38,9 +38,9 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
oldmessage = tmpencode;
}
- char *newmessage = NULL;
+ char *newmessage = nullptr;
char *username = contact_get_id(ccs->hContact);
- gcry_error_t err = otrl_message_sending(otr_user_state, &ops, (void*)ccs->hContact, proto, proto, username, OTRL_INSTAG_BEST, oldmessage, NULL, &newmessage, OTRL_FRAGMENT_SEND_ALL_BUT_LAST, NULL, add_appdata, (void*)ccs->hContact);
+ gcry_error_t err = otrl_message_sending(otr_user_state, &ops, (void*)ccs->hContact, proto, proto, username, OTRL_INSTAG_BEST, oldmessage, nullptr, &newmessage, OTRL_FRAGMENT_SEND_ALL_BUT_LAST, nullptr, add_appdata, (void*)ccs->hContact);
mir_free(username);
if (err) { /* Be *sure* not to send out plaintext */
@@ -50,7 +50,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){
return 1;
}
- if (newmessage == NULL)
+ if (newmessage == nullptr)
return Proto_ChainSend(wParam, ccs);
if(!newmessage[0]){
@@ -96,10 +96,10 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
if (!oldmessage)
return 1;
- ConnContext* context=NULL;
+ ConnContext* context=nullptr;
char *uname = contact_get_id(ccs->hContact);
- char *newmessage = NULL;
- OtrlTLV *tlvs = NULL;
+ char *newmessage = nullptr;
+ OtrlTLV *tlvs = nullptr;
lib_cs_lock();
int ignore_msg = otrl_message_receiving(otr_user_state, &ops, (void*)ccs->hContact,
@@ -122,7 +122,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
otrl_message_free(newmessage);
return 1; // discard internal protocol messages
}
- if (newmessage == NULL)
+ if (newmessage == nullptr)
return Proto_ChainRecv(wParam, ccs);
DWORD oldflags = pre->flags;