diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-22 00:14:40 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-22 01:12:34 +0200 |
commit | 447daa9179d94f86a972598e42eaab8b6913f3f7 (patch) | |
tree | 1513a8e641b19deed588ce1f07ecceee7ce4f0d5 | |
parent | edcb3e65c6398d4c4c70812b8209c8400c374099 (diff) | |
download | lvm2-447daa9179d94f86a972598e42eaab8b6913f3f7.tar.gz |
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.
-rw-r--r-- | lib/device/dev-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 7a124d038..06d44ce2b 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -491,7 +491,7 @@ static struct device *_get_device_for_sysfs_dev_name_using_devno(const char *dev 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 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; } - devno = MKDEV(major, minor); + devno = MKDEV((dev_t)major, (dev_t)minor); if (!(dev = (struct device *) btree_lookup(_cache.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)) || |