[Feature/Bug] mistake in assert check
[Cause] compilation error, testcase failure
[Solution] N/A
[Verification] Build and run tests
Change-Id: Ia9696593c5641a8cc5a2a8b2dc3a9c023609d864
int open(const std::string &path, int flags, mode_t mode)
{
- assert(!(flags & O_CREAT || flags & O_TMPFILE) || mode >= 0);
+ assert(!(flags & O_CREAT || flags & O_TMPFILE) || mode != static_cast<unsigned>(-1));
int fd;
}
char name[DEVICE_NAME_LENGTH];
- if (ioctl(fd, EVIOCGNAME(sizeof(name)), name) < 0) {
+ if (::ioctl(fd, EVIOCGNAME(sizeof(name)), name) < 0) {
LOGD("Failed to get the device name of: " << path);
if (::close(fd) < 0) {
LOGE("Error during closing file " << path);