From 436a2956d80db29ac1dff640b631620d856b4f70 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 22 Nov 2005 18:17:34 +0000 Subject: Re-run pgindent, fixing a problem where comment lines after a blank comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X. --- contrib/intarray/_int_gist.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'contrib/intarray/_int_gist.c') diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index 1e26bcef284..8f6dab69fe1 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -39,7 +39,7 @@ g_int_consistent(PG_FUNCTION_ARGS) if (strategy == BooleanSearchStrategy) PG_RETURN_BOOL(execconsistent((QUERYTYPE *) query, (ArrayType *) DatumGetPointer(entry->key), - GIST_LEAF(entry))); + GIST_LEAF(entry))); /* XXX are we sure it's safe to scribble on the query object here? */ /* XXX what about toasted input? */ @@ -97,7 +97,7 @@ g_int_union(PG_FUNCTION_ARGS) for (i = 0; i < entryvec->n; i++) { - ArrayType *ent = GETENTRY(entryvec, i); + ArrayType *ent = GETENTRY(entryvec, i); CHECKARRVALID(ent); totlen += ARRNELEMS(ent); @@ -108,8 +108,8 @@ g_int_union(PG_FUNCTION_ARGS) for (i = 0; i < entryvec->n; i++) { - ArrayType *ent = GETENTRY(entryvec, i); - int nel; + ArrayType *ent = GETENTRY(entryvec, i); + int nel; nel = ARRNELEMS(ent); memcpy(ptr, ARRPTR(ent), nel * sizeof(int4)); @@ -143,10 +143,10 @@ g_int_compress(PG_FUNCTION_ARGS) CHECKARRVALID(r); PREPAREARR(r); - if (ARRNELEMS(r)>= 2 * MAXNUMRANGE) - elog(NOTICE,"Input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead", - 2 * MAXNUMRANGE - 1, ARRNELEMS(r)); - + if (ARRNELEMS(r) >= 2 * MAXNUMRANGE) + elog(NOTICE, "Input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead", + 2 * MAXNUMRANGE - 1, ARRNELEMS(r)); + retval = palloc(sizeof(GISTENTRY)); gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, entry->offset, VARSIZE(r), FALSE); @@ -154,12 +154,14 @@ g_int_compress(PG_FUNCTION_ARGS) PG_RETURN_POINTER(retval); } - /* leaf entries never compress one more time, only when entry->leafkey ==true, - so now we work only with internal keys */ + /* + * leaf entries never compress one more time, only when entry->leafkey + * ==true, so now we work only with internal keys + */ r = (ArrayType *) PG_DETOAST_DATUM(entry->key); CHECKARRVALID(r); - if (ARRISVOID(r)) + if (ARRISVOID(r)) { if (r != (ArrayType *) DatumGetPointer(entry->key)) pfree(r); -- cgit v1.2.3