]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
cleanup: fix compilation warning about lack of parenthesis
authorEric Leblond <eric@inl.fr>
Thu, 31 Jul 2008 08:44:15 +0000 (10:44 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 31 Jul 2008 08:44:15 +0000 (10:44 +0200)
This patch adds parenthesis around an expression to avoid confusion
between order preference of && and || operators.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
output/pgsql/ulogd_output_PGSQL.c

index b04526a99d7fa3fa56878ae157ef8d618908ecf6..afab2ccb270130e508cbf0a12f5d1b318ea65a81 100644 (file)
@@ -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;