While 0 is technically correct, NULL is the semantically appropriate
choice for pointers.
Author: Bertrand Drouvot <
[email protected]>
Discussion: https://www.postgresql.org/message-id/aS1AYnZmuRZ8g%2B5G%40ip-10-97-1-34.eu-west-3.compute.internal
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(from));
- retval = 0; /* keep compiler quiet */
+ retval = NULL; /* keep compiler quiet */
break;
}
Shutdown <= SmartShutdown)
{
WalReceiverPMChild = StartChildProcess(B_WAL_RECEIVER);
- if (WalReceiverPMChild != 0)
+ if (WalReceiverPMChild != NULL)
WalReceiverRequested = false;
/* else leave the flag set, so we'll try again later */
}
* Make sure cache entry is marked invalid, in case we fail before
* setting things.
*/
- cache_entry->locale = 0;
+ cache_entry->locale = NULL;
}
- if (cache_entry->locale == 0)
+ if (cache_entry->locale == NULL)
{
cache_entry->locale = create_pg_locale(collid, CollationCacheContext);
}
errmsg("unit \"%s\" not supported for type %s",
lowunits, format_type_be(INTERVALOID)),
(val == DTK_WEEK) ? errdetail("Months usually have fractional weeks.") : 0));
- result = 0;
+ result = NULL;
}
}
if (entry->ecpgQuery)
{
ecpg_free(entry->ecpgQuery);
- entry->ecpgQuery = 0;
+ entry->ecpgQuery = NULL;
}
return entNo;