unsigned int i;
fr_schedule_worker_t *sw;
fr_schedule_network_t *sn;
+ int ret;
if (!sc) return 0;
* exited before the main thread cleans up the
* module instances.
*/
- if (pthread_join(sn->pthread_id, NULL) != 0) {
- ERROR("Failed joining network %i: %s", sn->id, fr_syserror(errno));
+ if ((ret = pthread_join(sn->pthread_id, NULL)) != 0) {
+ ERROR("Failed joining network %i: %s", sn->id, fr_syserror(ret));
} else {
DEBUG2("Network %i joined (cleaned up)", sn->id);
}
* exited before the main thread cleans up the
* module instances.
*/
- if (pthread_join(sw->pthread_id, NULL) != 0) {
- ERROR("Failed joining worker %i: %s", sw->id, fr_syserror(errno));
+ if ((ret = pthread_join(sw->pthread_id, NULL)) != 0) {
+ ERROR("Failed joining worker %i: %s", sw->id, fr_syserror(ret));
} else {
DEBUG2("Worker %i joined (cleaned up)", sw->id);
}
static int mod_instantiate(module_inst_ctx_t const *mctx)
{
rlm_cache_rbtree_t *driver = talloc_get_type_abort(mctx->inst->data, rlm_cache_rbtree_t);
+ int ret;
/*
* The cache.
return -1;
}
- if (pthread_mutex_init(&driver->mutex, NULL) < 0) {
- ERROR("Failed initializing mutex: %s", fr_syserror(errno));
+ if ((ret = pthread_mutex_init(&driver->mutex, NULL)) < 0) {
+ ERROR("Failed initializing mutex: %s", fr_syserror(ret));
return -1;
}
bool do_tls = false;
bool do_latency_aware_routing = false;
CassCluster *cluster;
+ int ret;
#define DO_CASS_OPTION(_opt, _x) \
do {\
}\
} while (0)
- if (pthread_mutex_init(&inst->connect_mutex, NULL) < 0) {
- ERROR("Failed initializing mutex: %s", fr_syserror(errno));
+ if ((ret = pthread_mutex_init(&inst->connect_mutex, NULL)) < 0) {
+ ERROR("Failed initializing mutex: %s", fr_syserror(ret));
TALLOC_FREE(inst);
return -1;
}