Since
a17923204736 (vacuumdb: enable parallel mode) -1 has been assigned
to a boolean. That can, justifiedly, trigger compiler warnings. There's
also no need for ternary logic, result was only ever set to 0 or -1. So
don't.
Discussion:
20150812084351.GD8470@awork2.anarazel.de
Backpatch: 9.5
ParallelSlot *slots = NULL;
SimpleStringList dbtables = {NULL, NULL};
int i;
- bool result = 0;
+ bool failed = false;
bool parallel = concurrentCons > 1;
const char *stage_commands[] = {
"SET default_statistics_target=1; SET vacuum_cost_delay=0;",
if (CancelRequested)
{
- result = -1;
+ failed = true;
goto finish;
}
free_slot = GetIdleSlot(slots, concurrentCons, dbname, progname);
if (!free_slot)
{
- result = -1;
+ failed = true;
goto finish;
}
termPQExpBuffer(&sql);
- if (result == -1)
+ if (failed)
exit(1);
}