Modify inappropritate condition check for task_create in tc_task 84/107984/1
authorjc_.kim <jc_.kim@samsung.com>
Mon, 2 Jan 2017 07:52:46 +0000 (16:52 +0900)
committerjc_.kim <jc_.kim@samsung.com>
Mon, 2 Jan 2017 07:52:46 +0000 (16:52 +0900)
task_create doesn't return the errno. when failed to create task,
it returns ERROR and sets errno.

Change-Id: I33750705143b6cbdd8c40510470cdaf5adf8615d

apps/examples/testcase/le_tc/kernel/tc_task.c

index d8fca72..06388ab 100644 (file)
@@ -473,7 +473,7 @@ static void tc_task_on_exit(void)
        g_callback = false;
 
        pid = task_create("tc_on_exit", SCHED_PRIORITY_DEFAULT, 2048, onexit_task, (char *const *)NULL);
-       if (pid == ENOMEM || pid < 0) {
+       if (pid < 0) {
                printf("tc_task_on_exit task_create FAIL, Error No: %d %d\n", errno, pid);
                total_fail++;
                RETURN_ERR;