diff options
author | Don Gagne <don@thegagnes.com> | 2014-06-29 12:53:59 -0700 |
---|---|---|
committer | Don Gagne <don@thegagnes.com> | 2014-06-29 12:53:59 -0700 |
commit | f0558a97ddbbd275022766603a866e86316bbb5b (patch) | |
tree | cd8fc28ec307ed5aa846a5b040689ec3f5499cb4 /src/modules/gpio_led/gpio_led.c | |
parent | d5b5dcef24a7f5c7b2ed98081dd69a05f8d46959 (diff) | |
download | px4-firmware-f0558a97ddbbd275022766603a866e86316bbb5b.tar.gz px4-firmware-f0558a97ddbbd275022766603a866e86316bbb5b.tar.bz2 px4-firmware-f0558a97ddbbd275022766603a866e86316bbb5b.zip |
Use same warnx/exit pattern
Diffstat (limited to 'src/modules/gpio_led/gpio_led.c')
-rw-r--r-- | src/modules/gpio_led/gpio_led.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/gpio_led/gpio_led.c b/src/modules/gpio_led/gpio_led.c index 1fc6d1295..def958c95 100644 --- a/src/modules/gpio_led/gpio_led.c +++ b/src/modules/gpio_led/gpio_led.c @@ -181,17 +181,13 @@ int gpio_led_main(int argc, char *argv[]) } else { gpio_led_started = true; warnx("start, using pin: %s", pin_name); + exit(0); } - - exit(0); - - } else if (!strcmp(argv[1], "stop")) { if (gpio_led_started) { gpio_led_started = false; - // FIXME: Is this correct? changed from warnx - errx(0, "stop"); - + warnx("stop"); + exit(0); } else { errx(1, "not running"); } |