aboutsummaryrefslogtreecommitdiff
path: root/contrib/array/array_iterator.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-05-25 16:15:34 +0000
committerBruce Momjian <bruce@momjian.us>1999-05-25 16:15:34 +0000
commit07842084fe3e11041f83563c851236395f481470 (patch)
treeab9960e67325bec5a97b8b4dd4b2075ce60cc420 /contrib/array/array_iterator.c
parent4b04b01aaa460f1e52980f24173dc7a4535efd2d (diff)
downloadpostgresql-07842084fe3e11041f83563c851236395f481470.tar.gz
postgresql-07842084fe3e11041f83563c851236395f481470.zip
pgindent run over code.
Diffstat (limited to 'contrib/array/array_iterator.c')
-rw-r--r--contrib/array/array_iterator.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/contrib/array/array_iterator.c b/contrib/array/array_iterator.c
index 5c4a3371a4f..1561c1b192b 100644
--- a/contrib/array/array_iterator.c
+++ b/contrib/array/array_iterator.c
@@ -43,8 +43,8 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
int ndim,
*dim;
char *p;
- FmgrInfo finf; /*Tobias Gabele Jan 18 1999*/
-
+ FmgrInfo finf; /* Tobias Gabele Jan 18 1999 */
+
/* Sanity checks */
if ((array == (ArrayType *) NULL)
@@ -75,9 +75,9 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
/* Lookup the function entry point */
proc_fn = (func_ptr) NULL;
- fmgr_info(proc,&finf); /*Tobias Gabele Jan 18 1999*/
- proc_fn=finf.fn_addr; /*Tobias Gabele Jan 18 1999*/
- pronargs=finf.fn_nargs; /*Tobias Gabele Jan 18 1999*/
+ fmgr_info(proc, &finf); /* Tobias Gabele Jan 18 1999 */
+ proc_fn = finf.fn_addr; /* Tobias Gabele Jan 18 1999 */
+ pronargs = finf.fn_nargs; /* Tobias Gabele Jan 18 1999 */
if ((proc_fn == NULL) || (pronargs != 2))
{
elog(ERROR, "array_iterator: fmgr_info lookup failed for oid %d", proc);
@@ -110,38 +110,26 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
{
result = (int) (*proc_fn) (p, value);
if (typlen > 0)
- {
p += typlen;
- }
else
- {
p += INTALIGN(*(int32 *) p);
- }
}
if (result)
{
if (!and)
- {
return (1);
- }
}
else
{
if (and)
- {
return (0);
- }
}
}
if (and && result)
- {
return (1);
- }
else
- {
return (0);
- }
}
/*
@@ -344,7 +332,7 @@ int32
array_oideq(ArrayType *array, Oid value)
{
return array_iterator((Oid) 26, /* oid */
- (Oid) 184, /* oideq */
+ (Oid) 184, /* oideq */
0, /* logical or */
array, (Datum) value);
}