Skip to content

Commit a4775a8

Browse files
committed
Suppress compiler warning, and not incidentally make the code more
robust. The previous coding was quite risky because it was testing conditions different from 'is the array really allocated?'.
1 parent 69a785b commit a4775a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/psql/describe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
1010
*
11-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.183 2008/07/18 03:32:52 tgl Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.184 2008/07/18 04:20:24 tgl Exp $
1212
*/
1313
#include "postgres_fe.h"
1414

@@ -1591,14 +1591,14 @@ describeOneTableDetails(const char *schemaname,
15911591
termPQExpBuffer(&title);
15921592
termPQExpBuffer(&tmpbuf);
15931593

1594-
if (tableinfo.relkind == 'S')
1594+
if (seq_values)
15951595
{
15961596
for (ptr = seq_values; *ptr; ptr++)
15971597
free(*ptr);
15981598
free(seq_values);
15991599
}
16001600

1601-
if (show_modifiers)
1601+
if (modifiers)
16021602
{
16031603
for (ptr = modifiers; *ptr; ptr++)
16041604
free(*ptr);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy