Skip to content

Commit 9625b18

Browse files
committed
Change if (!(x || y)) construct with if (!x && !y), for clarity.
1 parent fc6da31 commit 9625b18

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515
*
16-
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.115 2005/12/31 19:39:10 momjian Exp $
16+
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.116 2006/01/02 00:58:00 momjian Exp $
1717
* ----------
1818
*/
1919
#include "postgres.h"
@@ -810,9 +810,9 @@ pgstat_report_tabstat(void)
810810
int i;
811811

812812
if (pgStatSock < 0 ||
813-
!(pgstat_collect_querystring ||
814-
pgstat_collect_tuplelevel ||
815-
pgstat_collect_blocklevel))
813+
(!pgstat_collect_querystring &&
814+
!pgstat_collect_tuplelevel &&
815+
!pgstat_collect_blocklevel))
816816
{
817817
/* Not reporting stats, so just flush whatever we have */
818818
RegularTabStat.tsa_used = 0;
@@ -1224,9 +1224,9 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
12241224
void
12251225
pgstat_count_xact_commit(void)
12261226
{
1227-
if (!(pgstat_collect_querystring ||
1228-
pgstat_collect_tuplelevel ||
1229-
pgstat_collect_blocklevel))
1227+
if (!pgstat_collect_querystring &&
1228+
!pgstat_collect_tuplelevel &&
1229+
!pgstat_collect_blocklevel)
12301230
return;
12311231

12321232
pgStatXactCommit++;
@@ -1256,9 +1256,9 @@ pgstat_count_xact_commit(void)
12561256
void
12571257
pgstat_count_xact_rollback(void)
12581258
{
1259-
if (!(pgstat_collect_querystring ||
1260-
pgstat_collect_tuplelevel ||
1261-
pgstat_collect_blocklevel))
1259+
if (!pgstat_collect_querystring &&
1260+
!pgstat_collect_tuplelevel &&
1261+
!pgstat_collect_blocklevel)
12621262
return;
12631263

12641264
pgStatXactRollback++;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy