Skip to content

Commit f9dc021

Browse files
committed
Dropped bogus check and unused parameters allocation
1 parent 7a31f4f commit f9dc021

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

bin/pg_repack.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,21 +354,16 @@ static bool
354354
repack_one_database(const char *orderby, char *errbuf, size_t errsize)
355355
{
356356
bool ret = false;
357-
PGresult *res = NULL;
357+
PGresult *res = NULL;
358358
int i;
359359
int num;
360360
StringInfoData sql;
361361
SimpleStringListCell *cell;
362362
const char **params = NULL;
363363
size_t num_params = simple_string_list_size(table_list);
364364

365-
/* We need to be able to support at least two params, or more
366-
* if we have multiple --tables specified.
367-
*/
368-
if (num_params && num_params > 2)
365+
if (num_params)
369366
params = pgut_malloc(num_params * sizeof(char *));
370-
else
371-
params = pgut_malloc(2 * sizeof(char *));
372367

373368
initStringInfo(&sql);
374369

0 commit comments

Comments
 (0)