mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
coverity: use wider type for whole expression
Coverity likes when the types are same through the whole expression. And since dev_t is 64b - widen int type early.
This commit is contained in:
parent
edcb3e65c6
commit
447daa9179
@ -491,7 +491,7 @@ static struct device *_get_device_for_sysfs_dev_name_using_devno(const char *dev
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
devno = MKDEV(major, minor);
|
devno = MKDEV((dev_t)major, (dev_t)minor);
|
||||||
if (!(dev = (struct device *) btree_lookup(_cache.devices, (uint32_t) devno))) {
|
if (!(dev = (struct device *) btree_lookup(_cache.devices, (uint32_t) devno))) {
|
||||||
/*
|
/*
|
||||||
* If we get here, it means the device is referenced in sysfs, but it's not yet in /dev.
|
* If we get here, it means the device is referenced in sysfs, but it's not yet in /dev.
|
||||||
@ -851,7 +851,7 @@ static int _dev_cache_iterate_sysfs_for_index(const char *path)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
devno = MKDEV(major, minor);
|
devno = MKDEV((dev_t)major, (dev_t)minor);
|
||||||
if (!(dev = (struct device *) btree_lookup(_cache.devices, (uint32_t) devno)) &&
|
if (!(dev = (struct device *) btree_lookup(_cache.devices, (uint32_t) devno)) &&
|
||||||
!(dev = (struct device *) btree_lookup(_cache.sysfs_only_devices, (uint32_t) devno))) {
|
!(dev = (struct device *) btree_lookup(_cache.sysfs_only_devices, (uint32_t) devno))) {
|
||||||
if (!dm_device_get_name(major, minor, 1, devname, sizeof(devname)) ||
|
if (!dm_device_get_name(major, minor, 1, devname, sizeof(devname)) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user