From 61704a1f28aad1c64cbcdbec67be17e675482065 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 31 Jul 2008 10:44:15 +0200 Subject: cleanup: fix compilation warning about lack of parenthesis This patch adds parenthesis around an expression to avoid confusion between order preference of && and || operators. Signed-off-by: Eric Leblond Signed-off-by: Pablo Neira Ayuso --- output/pgsql/ulogd_output_PGSQL.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/pgsql/ulogd_output_PGSQL.c b/output/pgsql/ulogd_output_PGSQL.c index b04526a..afab2cc 100644 --- a/output/pgsql/ulogd_output_PGSQL.c +++ b/output/pgsql/ulogd_output_PGSQL.c @@ -288,8 +288,8 @@ static int execute_pgsql(struct ulogd_pluginstance *upi, struct pgsql_instance *pi = (struct pgsql_instance *) upi->private; pi->pgres = PQexec(pi->dbh, stmt); - if (!(pi->pgres && (PQresultStatus(pi->pgres) == PGRES_COMMAND_OK) - || (PQresultStatus(pi->pgres) == PGRES_TUPLES_OK))) { + if (!(pi->pgres && ((PQresultStatus(pi->pgres) == PGRES_COMMAND_OK) + || (PQresultStatus(pi->pgres) == PGRES_TUPLES_OK)))) { ulogd_log(ULOGD_ERROR, "execute failed (%s)\n", PQerrorMessage(pi->dbh)); return -1; -- cgit v1.2.3