Hi,
Trivial patch:
- remove a gcc warning (since commit 7a0574b5)
expression which evaluates to zero treated as a null pointer constant of
      type 'HeapTuple' (aka 'struct HeapTupleData *')

- always use "if (newtuple == NULL)" rather than mixing !newtuple and
newtuple == NULL

Regards
Didier
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 84144b46b1..0467a4811b 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -2533,7 +2533,7 @@ ExecBRInsertTriggers(EState *estate, ResultRelInfo *relinfo,
 					 TupleTableSlot *slot)
 {
 	TriggerDesc *trigdesc = relinfo->ri_TrigDesc;
-	HeapTuple	newtuple = false;
+	HeapTuple	newtuple = NULL;
 	bool		should_free;
 	TriggerData LocTriggerData;
 	int			i;
@@ -2563,7 +2563,7 @@ ExecBRInsertTriggers(EState *estate, ResultRelInfo *relinfo,
 							NULL, NULL, slot))
 			continue;
 
-		if (!newtuple)
+		if (newtuple == NULL)
 			newtuple = ExecFetchSlotHeapTuple(slot, true, &should_free);
 
 		LocTriggerData.tg_trigslot = slot;
@@ -3178,7 +3178,7 @@ ExecIRUpdateTriggers(EState *estate, ResultRelInfo *relinfo,
 {
 	TriggerDesc *trigdesc = relinfo->ri_TrigDesc;
 	TupleTableSlot *oldslot = ExecGetTriggerOldSlot(estate, relinfo);
-	HeapTuple	newtuple = false;
+	HeapTuple	newtuple = NULL;
 	bool		should_free;
 	TriggerData LocTriggerData;
 	int			i;
@@ -3207,7 +3207,7 @@ ExecIRUpdateTriggers(EState *estate, ResultRelInfo *relinfo,
 							NULL, oldslot, newslot))
 			continue;
 
-		if (!newtuple)
+		if (newtuple == NULL)
 			newtuple = ExecFetchSlotHeapTuple(newslot, true, &should_free);
 
 		LocTriggerData.tg_trigslot = oldslot;

Reply via email to