Content-Length: 286958 | pFad | http://github.com/postgrespro/postgres/commit/a4775a80fd444162ff878d2e945c8af7ba37eb89

72 Suppress compiler warning, and not incidentally make the code more · postgrespro/postgres@a4775a8 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/a4775a80fd444162ff878d2e945c8af7ba37eb89

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy