mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
hibernate-util: read_fiemap: add missing asserts
This commit is contained in:
@@ -390,6 +390,9 @@ int read_fiemap(int fd, struct fiemap **ret) {
|
||||
uint64_t fiemap_start = 0, fiemap_length;
|
||||
const size_t n_extra = DIV_ROUND_UP(sizeof(struct fiemap), sizeof(struct fiemap_extent));
|
||||
|
||||
assert(fd >= 0);
|
||||
assert(ret);
|
||||
|
||||
if (fstat(fd, &statinfo) < 0)
|
||||
return log_debug_errno(errno, "Cannot determine file size: %m");
|
||||
if (!S_ISREG(statinfo.st_mode))
|
||||
|
||||
Reference in New Issue
Block a user