console-client: Initialise prc before acessing it
On the first time through the loop, if the test is false:
if (pollfds[0].revents)
...
then prc is uninitalised when we access it here:
if (prc == PROCESS_OK && ...
To avoid this, initialise it to PROCESS_OK.
[jk: Minor change to use PROCESS_OK instead of PROCESS_ERR]
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
diff --git a/console-client.c b/console-client.c
index 130008c..b70fc95 100644
--- a/console-client.c
+++ b/console-client.c
@@ -208,6 +208,7 @@
if (rc)
goto out_fini;
+ prc = PROCESS_OK;
for (;;) {
pollfds[0].fd = client->fd_in;
pollfds[0].events = POLLIN;