1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Make sure contrib C functions are marked strict where needed.

Kris Jurka
This commit is contained in:
Tom Lane
2005-01-29 22:35:53 +00:00
parent 1263d7b8d1
commit 24162978b7
7 changed files with 57 additions and 62 deletions

View File

@ -13,7 +13,6 @@
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include "access/heapam.h"
@ -27,18 +26,14 @@
#include "fmgr.h"
#include "storage/lmgr.h"
#include "utils/fmgroids.h"
#include "utils/palloc.h"
#include "utils/rel.h"
#include "utils/tqual.h"
#include "misc_utils.h"
#undef MIN
#define MIN(x,y) ((x)<=(y) ? (x) : (y))
int
backend_pid()
backend_pid(void)
{
return getpid();
}
@ -51,15 +46,15 @@ unlisten(char *relname)
}
int
max(int x, int y)
int4max(int x, int y)
{
return ((x > y) ? x : y);
return Max(x, y);
}
int
min(int x, int y)
int4min(int x, int y)
{
return ((x < y) ? x : y);
return Min(x, y);
}
/*
@ -87,7 +82,7 @@ active_listeners(text *relname)
if (relname && (VARSIZE(relname) > VARHDRSZ))
{
MemSet(listen_name, 0, NAMEDATALEN);
len = MIN(VARSIZE(relname) - VARHDRSZ, NAMEDATALEN - 1);
len = Min(VARSIZE(relname) - VARHDRSZ, NAMEDATALEN - 1);
memcpy(listen_name, VARDATA(relname), len);
ScanKeyEntryInitialize(&key, 0,
Anum_pg_listener_relname,
@ -102,7 +97,7 @@ active_listeners(text *relname)
{
d = heap_getattr(lTuple, Anum_pg_listener_pid, tdesc, &isnull);
pid = DatumGetInt32(d);
if ((pid == ourpid) || (kill(pid, SIGTSTP) == 0))
if ((pid == ourpid) || (kill(pid, 0) == 0))
count++;
}
heap_endscan(sRel);