diff options
author | James Booth <boothj5@gmail.com> | 2015-05-04 22:55:04 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-04 22:55:04 +0100 |
commit | 2426a7fcfcfa2ee4e5ab0f9300e7d5296170f893 (patch) | |
tree | ce0cd50b4d1f75a783239af7ccea352041ebf50f | |
parent | a979d23e10a5ad2ee25dab12c1fbbb66b5362a6e (diff) | |
download | profani-tty-2426a7fcfcfa2ee4e5ab0f9300e7d5296170f893.tar.gz |
Use null check convention in otrlibv3.c
-rw-r--r-- | src/otr/otrlibv3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/otr/otrlibv3.c b/src/otr/otrlibv3.c index 77b0ee77..0b81796c 100644 --- a/src/otr/otrlibv3.c +++ b/src/otr/otrlibv3.c @@ -87,7 +87,7 @@ otrlib_end_session(OtrlUserState user_state, const char * const recipient, char ConnContext *context = otrl_context_find(user_state, recipient, jid, "xmpp", 0, NULL, NULL, NULL); - if (context != NULL) { + if (context) { otrl_message_disconnect(user_state, ops, NULL, jid, "xmpp", recipient); } } @@ -171,7 +171,7 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext } else { context->smstate->nextExpected = OTRL_SMP_EXPECT1; if (context->smstate->received_question == 0) { - if ((context->active_fingerprint->trust != NULL) && (context->active_fingerprint->trust[0] != '\0')) { + if (context->active_fingerprint->trust && (context->active_fingerprint->trust[0] != '\0')) { ui_smp_successful(context->username); ui_trust(context->username); } else { @@ -193,7 +193,7 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext otrl_message_abort_smp(user_state, ops, NULL, context); } else { context->smstate->nextExpected = OTRL_SMP_EXPECT1; - if ((context->active_fingerprint->trust != NULL) && (context->active_fingerprint->trust[0] != '\0')) { + if (context->active_fingerprint->trust && (context->active_fingerprint->trust[0] != '\0')) { ui_smp_successful(context->username); ui_trust(context->username); } else { |