clvmd_cluster_init_completed();
}
-static int _get_main_cluster_fd()
+static int _get_main_cluster_fd(void)
{
return cman_get_fd(c_handle);
}
-static int _get_num_nodes()
+static int _get_num_nodes(void)
{
int i;
int nnodes = 0;
DEBUGLOG("Added new node %d to updown list\n", nodeid);
}
-static void _cluster_closedown()
+static void _cluster_closedown(void)
{
dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
cman_finish(c_handle);
}
/* Get a list of active cluster members */
-static void get_members()
+static void get_members(void)
{
int retnodes;
int status;
return nodeid;
}
-static int _is_quorate()
+static int _is_quorate(void)
{
return cman_is_quorate(c_handle);
}
dm_list_init(&cmd->profile_params->profiles);
}
- dm_strncpy(cmd->profile_params->dir, dir, sizeof(cmd->profile_params->dir));
+ if (!(dm_strncpy(cmd->profile_params->dir, dir, sizeof(cmd->profile_params->dir)))) {
+ log_error("_init_profiles: dm_strncpy failed");
+ return 0;
+ }
return 1;
}
struct cft_check_handle *get_config_tree_check_handle(struct cmd_context *cmd,
struct dm_config_tree *cft)
{
- struct config_source *cs = dm_config_get_custom(cft);
+ struct config_source *cs;
if (!(cs = dm_config_get_custom(cft)))
return NULL;
if (cs->type == CONFIG_PROFILE_COMMAND) {
cft_previous = cft;
cft = cft->cascade;
- cs = dm_config_get_custom(cft);
}
cs = dm_config_get_custom(cft);
/* FIXME: handle tags */
if (!(pvl = find_pv_in_vg(vg_from, pv_name))) {
if (!enforce_pv_from_source &&
- (pvl = find_pv_in_vg(vg_to, pv_name)))
+ find_pv_in_vg(vg_to, pv_name))
/*
* PV has already been moved. This can happen if an
* LV is being moved that has multiple sub-LVs on the
(first_seg(seg_metalv(seg, s))->segtype != error_segtype))
continue;
- if (target_pvs && !dm_list_empty(target_pvs) &&
+ if (!dm_list_empty(target_pvs) &&
(target_pvs != &lv->vg->pvs)) {
/*
* User has supplied a list of PVs, but we
while (ts) {
if (waiting || !ts->active) {
- pthread_join(ts->client.thread_id, &rv);
+ if ((errno = pthread_join(ts->client.thread_id, &rv)))
+ ERROR(&s, "pthread_join failed: %s", strerror(errno));
last->next = ts->next;
dm_free(ts);
} else
struct dm_report *rh;
const struct dm_report_object_type *type;
+ if (_contains_reserved_report_type(types))
+ return_NULL;
+
if (!(rh = dm_zalloc(sizeof(*rh)))) {
log_error("dm_report_init: dm_malloc failed");
- return 0;
+ return NULL;
}
- if (_contains_reserved_report_type(types))
- return_0;
-
/*
* rh->report_types is updated in _parse_fields() and _parse_keys()
* to contain all types corresponding to the fields specified by
if (!rh) {
log_error(INTERNAL_ERROR "dm_report handler is NULL.");
- goto out;
+ return 0;
}
if (rh->flags & RH_ALREADY_REPORTED)
if (!(row = dm_pool_zalloc(rh->mem, sizeof(*row)))) {
log_error("dm_report_object: struct row allocation failed");
- goto out;
+ return 0;
}
row->rh = rh;