From: Zdenek Kabelac Date: Tue, 23 Feb 2016 20:16:08 +0000 (+0100) Subject: coverity: use same arithmetic for both major and minor X-Git-Tag: v2_02_144~54 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=ddfec5b51a46faab3f64de3e07dc52e0adaf81bc;p=lvm2.git coverity: use same arithmetic for both major and minor Run all arithmetic in the same 'dev_t' type. --- diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 7ad8982b4..2d59cf480 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -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,