Description:Repair Cppcheck Alarm

Match-id-b13726638f74c5b363a91e154f858480c077c51a
This commit is contained in:
xxxx
2023-01-13 11:14:31 +08:00
parent ae84976f24
commit f3fe82aca7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -445,7 +445,7 @@ void InputHub::ScanInputDevices(const std::string& dirname)
closedir(dir);
}
void InputHub::CloseFd(int fd)
void InputHub::CloseFd(int& fd)
{
if (fd < 0) {
DHLOGE("No fd need to be closed.");
+1 -1
View File
@@ -121,7 +121,7 @@ private:
Device* GetDeviceByPathLocked(const std::string& devicePath);
Device* GetDeviceByFdLocked(int fd);
Device* GetSupportDeviceByFd(int fd);
void CloseFd(int fd);
void CloseFd(int& fd);
bool IsDeviceRegistered(const std::string& devicePath);
bool ContainsNonZeroByte(const uint8_t* array, uint32_t startIndex, uint32_t endIndex);