{
struct tal_param param;
struct validation_thread *thread;
- int error;
+ int error, tmperr;
param.db = table;
SLIST_INIT(¶m.threads);
/* Wait for all */
while (!SLIST_EMPTY(¶m.threads)) {
thread = SLIST_FIRST(¶m.threads);
- error = pthread_join(thread->pid, NULL);
- if (error)
+ tmperr = pthread_join(thread->pid, NULL);
+ if (tmperr)
pr_crit("pthread_join() threw %d on the '%s' thread.",
- error, thread->tal_file);
+ tmperr, thread->tal_file);
SLIST_REMOVE_HEAD(¶m.threads, next);
if (thread->exit_status) {
error = thread->exit_status;