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 void
TeamBarMenuItem::Init() TeamBarMenuItem::Init()
{ {
team_info teamInfo; if (get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo) != B_OK)
get_team_info(fTeamID, &teamInfo); fTeamUsageInfo.kernel_time = fTeamUsageInfo.user_time = 0;
get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo);
if (fTeamID == B_SYSTEM_TEAM) { if (fTeamID == B_SYSTEM_TEAM) {
thread_info thinfos; thread_info thinfos;
bigtime_t idle = 0; bigtime_t idle = 0;