The fd could be 0, so add the case to the assertion.
Change-Id: I29225092682e6cc07b016f824891bb11013bb0b7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
ssize_t n_write;
off_t offset;
- assert(fd > 0);
+ assert(fd >= 0);
offset = sizeof(struct compatibility_info) * module;
n_write = pwrite(fd, info, sizeof(*info), offset);
if (ret < 0)
return ret;
- assert(fd > 0);
+ assert(fd >= 0);
offset = sizeof(struct compatibility_info) * module;
n_read = pread(fd, info, sizeof(*info), offset);
return ret;
}
- assert(fd > 0);
+ assert(fd >= 0);
for (enum hal_module index = HAL_MODULE_UNKNOWN + 1; index < HAL_MODULE_END; ++index) {
if (!infos[index].initialized)