Dropped bogus check and unused parameters allocation
This commit is contained in:
parent
7a31f4fbf6
commit
f9dc02191d
@ -354,7 +354,7 @@ static bool
|
|||||||
repack_one_database(const char *orderby, char *errbuf, size_t errsize)
|
repack_one_database(const char *orderby, char *errbuf, size_t errsize)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
PGresult *res = NULL;
|
PGresult *res = NULL;
|
||||||
int i;
|
int i;
|
||||||
int num;
|
int num;
|
||||||
StringInfoData sql;
|
StringInfoData sql;
|
||||||
@ -362,13 +362,8 @@ repack_one_database(const char *orderby, char *errbuf, size_t errsize)
|
|||||||
const char **params = NULL;
|
const char **params = NULL;
|
||||||
size_t num_params = simple_string_list_size(table_list);
|
size_t num_params = simple_string_list_size(table_list);
|
||||||
|
|
||||||
/* We need to be able to support at least two params, or more
|
if (num_params)
|
||||||
* if we have multiple --tables specified.
|
|
||||||
*/
|
|
||||||
if (num_params && num_params > 2)
|
|
||||||
params = pgut_malloc(num_params * sizeof(char *));
|
params = pgut_malloc(num_params * sizeof(char *));
|
||||||
else
|
|
||||||
params = pgut_malloc(2 * sizeof(char *));
|
|
||||||
|
|
||||||
initStringInfo(&sql);
|
initStringInfo(&sql);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user