Minor coding style cleanup.

This commit is contained in:
Axel Dörfler 2012-10-26 11:43:14 +02:00
parent 7135c4f8fe
commit 20537ad067
1 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2007-2011, Haiku, Inc. All rights reserved.
* Copyright 2007-2015, Haiku, Inc. All rights reserved.
* Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved.
* Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
* Distributed under the terms of the MIT License.
@ -178,8 +178,8 @@ MailDaemonApp::ReadyToRun()
BString string;
if (fNewMessages > 0) {
static BMessageFormat format(B_TRANSLATE(
"{0, plural, one{# new message} other{# new messages}}"));
BMessageFormat format(B_TRANSLATE(
"{0, plural, one{One new message} other{# new messages}}"));
format.Format(string, fNewMessages);
} else
@ -210,16 +210,16 @@ MailDaemonApp::RefsReceived(BMessage* message)
entry_ref ref;
for (int32 i = 0; message->FindRef("refs", i, &ref) == B_OK; i++) {
BNode node(&ref);
if (node.InitCheck() < B_OK)
if (node.InitCheck() != B_OK)
continue;
int32 account;
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE, 0, &account,
sizeof(account)) < 0)
sizeof(account)) < 0)
continue;
InboundProtocolThread* protocolThread = _FindInboundProtocol(account);
if (!protocolThread)
if (protocolThread == NULL)
continue;
BMessenger target;
@ -425,7 +425,8 @@ MailDaemonApp::InstallDeskbarIcon()
status = deskbar.AddItem(&ref);
if (status < B_OK) {
fprintf(stderr, "Can't add deskbar replicant: %s\n", strerror(status));
fprintf(stderr, "Can't add deskbar replicant: %s\n",
strerror(status));
return;
}
}
@ -691,7 +692,7 @@ MailDaemonApp::_ReloadAccounts(BMessage* message)
if (it != fAccounts.end())
_RemoveAccount(it);
BMailAccountSettings* settings = accounts.AccountByID(account);
if (settings)
if (settings != NULL)
_InitAccount(*settings);
}
}
@ -791,9 +792,10 @@ MailDaemonApp::_UpdateAutoCheck(bigtime_t interval)
if (fAutoCheckRunner != NULL) {
fAutoCheckRunner->SetInterval(interval);
fAutoCheckRunner->SetCount(-1);
} else
} else {
fAutoCheckRunner = new BMessageRunner(be_app_messenger,
new BMessage('moto'), interval);
}
} else {
delete fAutoCheckRunner;
fAutoCheckRunner = NULL;