]> sourceware.org Git - lvm2.git/commitdiff
coverity: use same arithmetic for both major and minor
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 20:16:08 +0000 (21:16 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 20:40:17 +0000 (21:40 +0100)
Run all arithmetic in the same 'dev_t' type.

lib/activate/dev_manager.c

index 7ad8982b48fa448a5b5963d27e2b7fbdb5da198e..2d59cf480d72436e1cdd1bb47d3f723574d96c08 100644 (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,
This page took 0.042725 seconds and 5 git commands to generate.