summaryrefslogtreecommitdiffstats
path: root/src/kernel/taskmgr.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-04-26 13:23:30 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-05-01 14:03:50 -0500
commitc9be87b42af523b35b1bcb727527341ecd9a5fd4 (patch)
treef72d32196b3fbbca0b994bfc61a4bdecc4eb6d5c /src/kernel/taskmgr.C
parent02cf3abca60d9f7e2b218e1a445c3c80230a3ceb (diff)
downloadtalos-hostboot-c9be87b42af523b35b1bcb727527341ecd9a5fd4.tar.gz
talos-hostboot-c9be87b42af523b35b1bcb727527341ecd9a5fd4.zip
Clean up potential uninitialized object instances.
Change-Id: I859f94234d5672f55f745dd37b9662c310b694a7 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4236 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/taskmgr.C')
-rw-r--r--src/kernel/taskmgr.C51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/kernel/taskmgr.C b/src/kernel/taskmgr.C
index 2ff6ce4ad..6a4850fec 100644
--- a/src/kernel/taskmgr.C
+++ b/src/kernel/taskmgr.C
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/kernel/taskmgr.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2010 - 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/kernel/taskmgr.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2010,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#include <util/singleton.H>
#include <kernel/taskmgr.H>
#include <kernel/task.H>
@@ -86,8 +86,7 @@ task_t* TaskManager::_createIdleTask()
task_t* TaskManager::_createTask(TaskManager::task_fn_t t,
void* p, bool withStack, bool kernelParent)
{
- task_t* task = new task_t;
- memset(task, '\0', sizeof(task_t));
+ task_t* task = new task_t();
task->tid = this->getNextTid();
@@ -127,7 +126,7 @@ task_t* TaskManager::_createTask(TaskManager::task_fn_t t,
task->state_info = NULL;
// Create tracker instance for this task.
- task_tracking_t* tracker = new task_tracking_t;
+ task_tracking_t* tracker = new task_tracking_t();
tracker->key = task->tid;
tracker->task = task;
tracker->status = -1;
@@ -293,7 +292,7 @@ void TaskManager::_waitTask(task_t* t, int64_t tid, int* status, void** retval)
}
else // Otherwise, create wait-info to defer task.
{
- task_wait_t* tj = t->tracker->wait_info = new task_wait_t;
+ task_wait_t* tj = t->tracker->wait_info = new task_wait_t();
tj->tid = tid;
tj->status = status;
tj->retval = retval;
OpenPOWER on IntegriCloud