ProcessController: Fix CID 701784

Unchecked return value  (CHECKED_RETURN)

If get_team_usage_info() fails set the times to 0.

Also remove unused get_team_info() call.
This commit is contained in:
John Scipione 2014-06-30 17:23:17 -04:00
parent 37add6e474
commit 844df0d7a4

View File

@ -46,9 +46,9 @@ TeamBarMenuItem::TeamBarMenuItem(BMenu* menu, BMessage* kill_team, team_id team,
void
TeamBarMenuItem::Init()
{
team_info teamInfo;
get_team_info(fTeamID, &teamInfo);
get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo);
if (get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo) != B_OK)
fTeamUsageInfo.kernel_time = fTeamUsageInfo.user_time = 0;
if (fTeamID == B_SYSTEM_TEAM) {
thread_info thinfos;
bigtime_t idle = 0;