aboutsummaryrefslogtreecommitdiff
path: root/contrib/miscutil/misc_utils.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-04-12 17:17:23 +0000
committerBruce Momjian <bruce@momjian.us>2000-04-12 17:17:23 +0000
commit52f77df613cea1803ce86321c37229626d9f213c (patch)
treebd9ac9f667f295cb65f4c448a5bb5a062d656b27 /contrib/miscutil/misc_utils.c
parentdb4518729d85da83eafdacbcebaeb12618517595 (diff)
downloadpostgresql-52f77df613cea1803ce86321c37229626d9f213c.tar.gz
postgresql-52f77df613cea1803ce86321c37229626d9f213c.zip
Ye-old pgindent run. Same 4-space tabs.
Diffstat (limited to 'contrib/miscutil/misc_utils.c')
-rw-r--r--contrib/miscutil/misc_utils.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c
index 6745b5b8bb9..302118689dc 100644
--- a/contrib/miscutil/misc_utils.c
+++ b/contrib/miscutil/misc_utils.c
@@ -38,6 +38,7 @@ extern int assertTest(int val);
#ifdef ASSERT_CHECKING_TEST
extern int assertEnable(int val);
+
#endif
int
@@ -84,7 +85,8 @@ active_listeners(text *relname)
ScanKeyData key;
Datum d;
bool isnull;
- int len, pid;
+ int len,
+ pid;
int count = 0;
int ourpid = getpid();
char listen_name[NAMEDATALEN];
@@ -92,8 +94,9 @@ active_listeners(text *relname)
lRel = heap_openr(ListenerRelationName, AccessShareLock);
tdesc = RelationGetDescr(lRel);
- if (relname && (VARSIZE(relname) > VARHDRSZ)) {
- len = MIN(VARSIZE(relname)-VARHDRSZ, NAMEDATALEN-1);
+ if (relname && (VARSIZE(relname) > VARHDRSZ))
+ {
+ len = MIN(VARSIZE(relname) - VARHDRSZ, NAMEDATALEN - 1);
strncpy(listen_name, VARDATA(relname), len);
listen_name[len] = '\0';
ScanKeyEntryInitialize(&key, 0,
@@ -101,15 +104,16 @@ active_listeners(text *relname)
F_NAMEEQ,
PointerGetDatum(listen_name));
sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key);
- } else {
- sRel = heap_beginscan(lRel, 0, SnapshotNow, 0, (ScanKey)NULL);
}
+ else
+ sRel = heap_beginscan(lRel, 0, SnapshotNow, 0, (ScanKey) NULL);
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
{
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, SIGTSTP) == 0))
+ {
/* elog(NOTICE, "%d ok", pid); */
count++;
}
@@ -134,6 +138,7 @@ assert_test(int val)
{
return assertTest(val);
}
+
#endif
#endif
@@ -141,8 +146,8 @@ assert_test(int val)
/*
* Local Variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
* End:
*/