]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod_command.c
audiod: Make command array static.
[paraslash.git] / audiod_command.c
index 35b76b5f6fa277ea2aa55656f557b32ef36b5585..7b69e1ab070198a52e33f4722188cba1a769dd2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -30,7 +30,7 @@ extern struct sched sched;
 extern char *stat_item_values[NUM_STAT_ITEMS];
 
 
-struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
+static struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
 
 /** Iterate over the array of all audiod commands. */
 #define FOR_EACH_COMMAND(c) for (c = 0; audiod_cmds[c].name; c++)
@@ -442,7 +442,7 @@ int handle_connect(int accept_fd, fd_set *rfds)
        if (ret < 0)
                goto out;
        ret = create_argv(buf, "\n", &argv);
-       if (ret < 0)
+       if (ret <= 0)
                goto out;
        argc = ret;
        //PARA_INFO_LOG("argv[0]: %s, argc = %d\n", argv[0], argc);