hrev43502 adds 1 changeset to branch 'master' old head: c8677fb1384051cb147d53ff8e5d9f1f41a35201 new head: 3692fd58c55d6abc7da78f2667c8cd0730dfe0ad ---------------------------------------------------------------------------- 3692fd5: Minor cleanup, no functional change. [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev43502 Commit: 3692fd58c55d6abc7da78f2667c8cd0730dfe0ad URL: http://cgit.haiku-os.org/haiku/commit/?id=3692fd5 Author: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> Date: Wed Dec 14 23:51:42 2011 UTC ---------------------------------------------------------------------------- 1 files changed, 8 insertions(+), 15 deletions(-) src/servers/mail/MailDaemon.cpp | 23 ++++++++--------------- ---------------------------------------------------------------------------- diff --git a/src/servers/mail/MailDaemon.cpp b/src/servers/mail/MailDaemon.cpp index 5459769..9c0a317 100644 --- a/src/servers/mail/MailDaemon.cpp +++ b/src/servers/mail/MailDaemon.cpp @@ -458,9 +458,8 @@ MailDaemonApp::GetNewMessages(BMessage* msg) int32 account = -1; if (msg->FindInt32("account", &account) == B_OK && account >= 0) { InboundProtocolThread* protocol = _FindInboundProtocol(account); - if (!protocol) - return; - protocol->SyncMessages(); + if (protocol != NULL) + protocol->SyncMessages(); return; } @@ -468,9 +467,8 @@ MailDaemonApp::GetNewMessages(BMessage* msg) AccountMap::const_iterator it = fAccounts.begin(); for (; it != fAccounts.end(); it++) { InboundProtocolThread* protocol = it->second.inboundThread; - if (!protocol) - continue; - protocol->SyncMessages(); + if (protocol != NULL) + protocol->SyncMessages(); } } @@ -483,7 +481,6 @@ MailDaemonApp::SendPendingMessages(BMessage* msg) map<int32, send_mails_info> messages; - int32 account = -1; if (msg->FindInt32("account", &account) != B_OK) account = -1; @@ -738,7 +735,6 @@ MailDaemonApp::_CreateInboundProtocol(BMailAccountSettings& settings, image_id& image) { const entry_ref& entry = settings.InboundPath(); - InboundProtocol* (*instantiate_protocol)(BMailAccountSettings*); BPath path(&entry); @@ -746,13 +742,12 @@ MailDaemonApp::_CreateInboundProtocol(BMailAccountSettings& settings, if (image < 0) return NULL; if (get_image_symbol(image, "instantiate_inbound_protocol", - B_SYMBOL_TYPE_TEXT, (void **)&instantiate_protocol) != B_OK) { + B_SYMBOL_TYPE_TEXT, (void**)&instantiate_protocol) != B_OK) { unload_add_on(image); image = -1; return NULL; } - InboundProtocol* protocol = (*instantiate_protocol)(&settings); - return protocol; + return (*instantiate_protocol)(&settings); } @@ -761,7 +756,6 @@ MailDaemonApp::_CreateOutboundProtocol(BMailAccountSettings& settings, image_id& image) { const entry_ref& entry = settings.OutboundPath(); - OutboundProtocol* (*instantiate_protocol)(BMailAccountSettings*); BPath path(&entry); @@ -769,13 +763,12 @@ MailDaemonApp::_CreateOutboundProtocol(BMailAccountSettings& settings, if (image < 0) return NULL; if (get_image_symbol(image, "instantiate_outbound_protocol", - B_SYMBOL_TYPE_TEXT, (void **)&instantiate_protocol) != B_OK) { + B_SYMBOL_TYPE_TEXT, (void**)&instantiate_protocol) != B_OK) { unload_add_on(image); image = -1; return NULL; } - OutboundProtocol* protocol = (*instantiate_protocol)(&settings); - return protocol; + return (*instantiate_protocol)(&settings); }