mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-28 05:57:49 +03:00
Remove dead assignment of 'ret' value
Variable 'ret' assigned from _do_event() was actually not used and replaced with next assignment without any read of the returned value. Code is reformated - so the error path is put in the if() branch and normal code is put after the 'if' together with FIXME comment. FIXME lowprio: logging needs to be fixed in this code, - multiple log_errors are printed, stacks are missing...
This commit is contained in:
parent
6c1db4a7d6
commit
41b1b9487c
@ -715,17 +715,18 @@ int dm_event_get_registered_device(struct dm_event_handler *dmevh, int next)
|
|||||||
|
|
||||||
uuid = dm_task_get_uuid(dmt);
|
uuid = dm_task_get_uuid(dmt);
|
||||||
|
|
||||||
if (!(ret = _do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE :
|
if (_do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE :
|
||||||
DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path,
|
DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path,
|
||||||
&msg, dmevh->dso, uuid, dmevh->mask, 0))) {
|
&msg, dmevh->dso, uuid, dmevh->mask, 0)) {
|
||||||
/* FIXME this will probably horribly break if we get
|
|
||||||
ill-formatted reply */
|
|
||||||
ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask);
|
|
||||||
} else {
|
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
|
stack;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME this will probably horribly break if we get
|
||||||
|
ill-formatted reply */
|
||||||
|
ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask);
|
||||||
|
|
||||||
dm_task_destroy(dmt);
|
dm_task_destroy(dmt);
|
||||||
dmt = NULL;
|
dmt = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user