diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-05 10:04:03 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-05 10:04:03 -0600 |
commit | 22156db1c97cec395d0302712e4590642d3e6a55 (patch) | |
tree | fd7e3c6becd1fada22f22143d22a019c20c00fac /apps/system/nxplayer | |
parent | 19b0e9d6f6a06b289143aa833bc9daf174d76aae (diff) | |
download | px4-nuttx-22156db1c97cec395d0302712e4590642d3e6a55.tar.gz px4-nuttx-22156db1c97cec395d0302712e4590642d3e6a55.tar.bz2 px4-nuttx-22156db1c97cec395d0302712e4590642d3e6a55.zip |
Costmetic changes
Diffstat (limited to 'apps/system/nxplayer')
-rw-r--r-- | apps/system/nxplayer/nxplayer_main.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/apps/system/nxplayer/nxplayer_main.c b/apps/system/nxplayer/nxplayer_main.c index e9849cf69..48a9a2bfa 100644 --- a/apps/system/nxplayer/nxplayer_main.c +++ b/apps/system/nxplayer/nxplayer_main.c @@ -198,34 +198,33 @@ static int nxplayer_cmd_play(FAR struct nxplayer_s *pPlayer, char* parg) * -ENOENT The media file was not found */ - if (ret == -ENODEV) + switch (-ret) { - printf("No suitable Audio Device found\n"); - } + case OK: + break; - else if (ret == -EBUSY) - { - printf("Audio device busy\n"); - } + case ENODEV: + printf("No suitable Audio Device found\n"); + break; - else if (ret == -ENOENT) - { - printf("File %s not found\n", parg); - } + case EBUSY: + printf("Audio device busy\n"); + break; - else if (ret == -ENOSYS) - { - printf("Unknown audio format\n"); - } + case ENOENT: + printf("File %s not found\n", parg); + break; - if (ret < 0) - { - return ret; - } + case ENOSYS: + printf("Unknown audio format\n"); + break; - /* File playing successfully */ + default: + printf("Error playing file: %d\n", -ret); + break; + } - return OK; + return ret; } /**************************************************************************** |