Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4775a8

Browse files
committed
Suppress compiler warning, and not incidentally make the code more
robust. The previous coding was quite risky because it was testingconditions different from 'is the array really allocated?'.
1 parent69a785b commita4775a8

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/1803:32:52 tgl Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.184 2008/07/1804: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)

[8]ページ先頭

©2009-2025 Movatter.jp