mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: use unrelated temporary variables
use of tmp_rq2 is unrelated to tmp_rq - so use separate variable.
This commit is contained in:
parent
450ac7be42
commit
636c51ae3f
@ -1020,7 +1020,7 @@ static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gna
|
||||
int i_am_server;
|
||||
int response = 0;
|
||||
struct clog_request *rq = msg;
|
||||
struct clog_request *tmp_rq;
|
||||
struct clog_request *tmp_rq, *tmp_rq2;
|
||||
struct clog_cpg *match;
|
||||
|
||||
match = find_clog_cpg(handle);
|
||||
@ -1151,18 +1151,17 @@ static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gna
|
||||
|
||||
if (match->state == INVALID) {
|
||||
LOG_DBG("Log not valid yet, storing request");
|
||||
tmp_rq = malloc(DM_ULOG_REQUEST_SIZE);
|
||||
if (!tmp_rq) {
|
||||
if (!(tmp_rq2 = malloc(DM_ULOG_REQUEST_SIZE))) {
|
||||
LOG_ERROR("cpg_message_callback: Unable to"
|
||||
" allocate transfer structs");
|
||||
r = -ENOMEM; /* FIXME: Better error #? */
|
||||
goto out;
|
||||
}
|
||||
|
||||
memcpy(tmp_rq, rq, sizeof(*rq) + rq->u_rq.data_size);
|
||||
tmp_rq->pit_server = match->lowest_id;
|
||||
dm_list_init(&tmp_rq->u.list);
|
||||
dm_list_add(&match->startup_list, &tmp_rq->u.list);
|
||||
memcpy(tmp_rq2, rq, sizeof(*rq) + rq->u_rq.data_size);
|
||||
tmp_rq2->pit_server = match->lowest_id;
|
||||
dm_list_init(&tmp_rq2->u.list);
|
||||
dm_list_add(&match->startup_list, &tmp_rq2->u.list);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user