1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Prevent tv_sec from becoming negative in connection timeout code.

This commit is contained in:
Bruce Momjian
2002-10-11 04:12:14 +00:00
parent c2311337f0
commit 6a7bb0afbc
6 changed files with 68 additions and 27 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.15 2002/06/20 20:29:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.16 2002/10/11 04:12:14 momjian Exp $
*
* HISTORY
* Andrew Yu Oct 20, 1994 file creation
@ -28,15 +28,5 @@
* macro makeNode. eg. to create a Resdom node, use makeNode(Resdom)
*
*/
Node *
newNode(Size size, NodeTag tag)
{
Node *newNode;
Node *newNodeMacroHolder;
Assert(size >= sizeof(Node)); /* need the tag, at least */
newNode = (Node *) palloc(size);
MemSet((char *) newNode, 0, size);
newNode->type = tag;
return newNode;
}