aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-07-18 04:20:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-07-18 04:20:24 +0000
commita4775a80fd444162ff878d2e945c8af7ba37eb89 (patch)
tree6a6af0c12fe8ade51191f5a4dedae6242ae6f389 /src
parent69a785b8bfe076847f72317a41964821e85ccfd6 (diff)
downloadpostgresql-a4775a80fd444162ff878d2e945c8af7ba37eb89.tar.gz
postgresql-a4775a80fd444162ff878d2e945c8af7ba37eb89.zip
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?'.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/describe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 0a0819cc029..137ea6c2d44 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -8,7 +8,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.183 2008/07/18 03:32:52 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.184 2008/07/18 04:20:24 tgl Exp $
*/
#include "postgres_fe.h"
@@ -1591,14 +1591,14 @@ error_return:
termPQExpBuffer(&title);
termPQExpBuffer(&tmpbuf);
- if (tableinfo.relkind == 'S')
+ if (seq_values)
{
for (ptr = seq_values; *ptr; ptr++)
free(*ptr);
free(seq_values);
}
- if (show_modifiers)
+ if (modifiers)
{
for (ptr = modifiers; *ptr; ptr++)
free(*ptr);