Skip to content

Commit f2bc5c3

Browse files
committed
ISO C90 forbids mixed declarations and code in C
Declaration must always be atop the function body.
1 parent f123bfa commit f2bc5c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pg_show_plans.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ _PG_init(void)
239239
static void
240240
pgsp_shmem_startup(void)
241241
{
242-
if (prev_shmem_startup_hook) /* Call old hook function, if exists. */
243-
prev_shmem_startup_hook();
244-
245242
bool found; /* Does shared extension state structure exist? */
246243
HASHCTL info; /* Query plans hash table info. */
247244

245+
if (prev_shmem_startup_hook) /* Call old hook function, if exists. */
246+
prev_shmem_startup_hook();
247+
248248
pgsp_max = MaxConnections;
249249
pgsp = NULL;
250250
pgsp_hash = NULL;
@@ -293,13 +293,13 @@ pgsp_shmem_shutdown(int code, Datum arg)
293293
static void
294294
pgsp_ExecutorStart(QueryDesc *queryDesc, int eflags)
295295
{
296+
ExplainState *es = NewExplainState();
297+
296298
if (prev_ExecutorStart) /* Call previous hook, if exists. */
297299
prev_ExecutorStart(queryDesc, eflags);
298300
else
299301
standard_ExecutorStart(queryDesc, eflags);
300302

301-
ExplainState *es = NewExplainState();
302-
303303
/* Bypass the following steps if this pgsp_enable is set to false. */
304304
if (!pgsp_enable)
305305
return;

0 commit comments

Comments
 (0)