]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gui: Initialize command_fds to -1.
authorAndre Noll <maan@systemlinux.org>
Sat, 29 Mar 2014 12:48:40 +0000 (13:48 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 12:04:04 +0000 (14:04 +0200)
We check at various locations whether the two members of the
command_fds array are negative to tell if an external command or a
display command is currently running. At startup, there is no such
command, hence the two integers of the array should be initialized
to a negative value.

gui.c

diff --git a/gui.c b/gui.c
index aff2b1af5bb8d7cb4e7579129a1bdd1e272cfc68..4246eb11e51b03417520eee9bdbc2bf0f2f563fe 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -56,7 +56,7 @@ static unsigned scroll_position;
 static int curses_active;
 static pid_t cmd_pid;
 
 static int curses_active;
 static pid_t cmd_pid;
 
-static int command_fds[2];
+static int command_fds[2] = {-1, -1};
 static int stat_pipe = -1;
 static struct gui_args_info conf;
 
 static int stat_pipe = -1;
 static struct gui_args_info conf;