1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

coverity: use same arithmetic for both major and minor

Run all arithmetic in the same 'dev_t' type.
This commit is contained in:
Zdenek Kabelac 2016-02-23 21:16:08 +01:00
parent 9e3a9eab0e
commit ddfec5b51a

View File

@ -316,7 +316,7 @@ static int _ignore_blocked_mirror_devices(struct device *dev,
if (!(tmp_dev = dev_create_file(buf, NULL, NULL, 0)))
goto_out;
tmp_dev->dev = MKDEV((dev_t)sm->logs[0].major, sm->logs[0].minor);
tmp_dev->dev = MKDEV((dev_t)sm->logs[0].major, (dev_t)sm->logs[0].minor);
if (device_is_usable(tmp_dev, (struct dev_usable_check_params)
{ .check_empty = 1,
.check_blocked = 1,