From 31234e0be7d17d03895879a36ce17be814b81257 Mon Sep 17 00:00:00 2001 From: Jongmin Lee Date: Mon, 7 Oct 2019 17:36:29 +0900 Subject: [PATCH] Resolve the possible use of negative value (detected by coverity tool) Change-Id: Ibb68f024ef14a0beb10d2bc63ff28fe03d55762f --- bus/at-spi-bus-launcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index b15345b..91bdd48 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -400,8 +400,8 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) return TRUE; error: - close (app->pipefd[0]); - close (app->pipefd[1]); + if (app->pipefd[0] > 0) close (app->pipefd[0]); + if (app->pipefd[1] > 0) close (app->pipefd[1]); app->state = A11Y_BUS_STATE_ERROR; return FALSE; -- 2.7.4