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

cov: sanitize function environment

Coverity can see that function is either used with 'dev' or 'def'.
This commit is contained in:
Zdenek Kabelac 2021-09-21 18:46:52 +02:00
parent a13dfcbc77
commit 30e27d2f8b

View File

@ -379,6 +379,9 @@ static bool _read_bytes(struct device *dev, struct devicefile *def, uint64_t sta
if (dev) if (dev)
return dev_read_bytes(dev, start, len, data); return dev_read_bytes(dev, start, len, data);
if (!def)
return false;
off = lseek(def->fd, start, SEEK_SET); off = lseek(def->fd, start, SEEK_SET);
if (off != start) if (off != start)
return false; return false;