aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2015-07-24 09:49:33 -0400
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-27 11:56:15 +0300
commitcd582949369ac9a659b133f1a3259717e4a9fa44 (patch)
tree80ed1664cf045a14cc56365dc46bcd72a2f04e24 /helper
parent1d44b3c708ade0faea53deb022efd30221f1dd18 (diff)
helper: linux: catch possible undefined
It is possible that wait will return a valid pid but have failed to have set a status. Set a default status so that if this occurs the value will be known and not garbage. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'helper')
-rw-r--r--helper/linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/linux.c b/helper/linux.c
index 4256f43..3d3b6b8 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -198,7 +198,7 @@ int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)
{
pid_t pid;
int i, j;
- int status;
+ int status = 0;
for (i = 0; i < num; i++) {
pid = wait(&status);