From f473842f96c944faa526bb2426a9812eed0a1095 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 9 May 2017 10:59:24 -0600 Subject: [PATCH] Fix some calls to task_create(): argv[0] is the first parameter, not the name of the task. --- examples/alarm/alarm_main.c | 7 +------ examples/canard/canard_main.c | 6 +----- examples/leds/leds_main.c | 6 +----- system/sched_note/note_main.c | 6 +----- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/examples/alarm/alarm_main.c b/examples/alarm/alarm_main.c index 9a2626c30..3d8b7a4b2 100644 --- a/examples/alarm/alarm_main.c +++ b/examples/alarm/alarm_main.c @@ -160,17 +160,12 @@ errout: static int start_daemon(void) { - FAR char *alarmargv[2]; - if (!g_alarm_daemon_started) { - alarmargv[0] = "alarm_daemon"; - alarmargv[1] = NULL; - g_alarm_daeon_pid = task_create("alarm_daemon", CONFIG_EXAMPLES_ALARM_PRIORITY, CONFIG_EXAMPLES_ALARM_STACKSIZE, alarm_daemon, - (FAR char * const *)alarmargv); + NULL); if (g_alarm_daeon_pid < 0) { int errcode = errno; diff --git a/examples/canard/canard_main.c b/examples/canard/canard_main.c index 21e0a56e9..6633e8b9e 100644 --- a/examples/canard/canard_main.c +++ b/examples/canard/canard_main.c @@ -514,7 +514,6 @@ int main(int argc, FAR char *argv[]) int canard_main(int argc, FAR char *argv[]) #endif { - FAR char *canardargv[2]; int ret; printf("canard_main: Starting canard_daemon\n"); @@ -524,12 +523,9 @@ int canard_main(int argc, FAR char *argv[]) return EXIT_SUCCESS; } - canardargv[0] = "canard_daemon"; - canardargv[1] = NULL; - ret = task_create("canard_daemon", CONFIG_EXAMPLES_LIBCANARD_DAEMON_PRIORITY, CONFIG_EXAMPLES_LIBCANARD_STACKSIZE, canard_daemon, - (FAR char *const *)canardargv); + NULL); if (ret < 0) { int errcode = errno; diff --git a/examples/leds/leds_main.c b/examples/leds/leds_main.c index 44dbbee1a..b8f51e015 100644 --- a/examples/leds/leds_main.c +++ b/examples/leds/leds_main.c @@ -197,7 +197,6 @@ int main(int argc, FAR char *argv[]) int leds_main(int argc, FAR char *argv[]) #endif { - FAR char *ledargv[2]; int ret; printf("leds_main: Starting the led_daemon\n"); @@ -207,12 +206,9 @@ int leds_main(int argc, FAR char *argv[]) return EXIT_SUCCESS; } - ledargv[0] = "led_daemon"; - ledargv[1] = NULL; - ret = task_create("led_daemon", CONFIG_EXAMPLES_LEDS_PRIORITY, CONFIG_EXAMPLES_LEDS_STACKSIZE, led_daemon, - (FAR char * const *)ledargv); + NULL); if (ret < 0) { int errcode = errno; diff --git a/system/sched_note/note_main.c b/system/sched_note/note_main.c index c0dc6ea55..0e5d72ace 100644 --- a/system/sched_note/note_main.c +++ b/system/sched_note/note_main.c @@ -649,7 +649,6 @@ int main(int argc, FAR char *argv[]) int note_main(int argc, FAR char *argv[]) #endif { - FAR char *ledargv[2]; int ret; printf("note_main: Starting the note_daemon\n"); @@ -659,12 +658,9 @@ int note_main(int argc, FAR char *argv[]) return EXIT_SUCCESS; } - ledargv[0] = "note_daemon"; - ledargv[1] = NULL; - ret = task_create("note_daemon", CONFIG_SYSTEM_NOTE_PRIORITY, CONFIG_SYSTEM_NOTE_STACKSIZE, note_daemon, - (FAR char * const *)ledargv); + NULL); if (ret < 0) { int errcode = errno;