mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-18 16:04:40 -04:00
Description:Repair Cppcheck Alarm
Match-id-b13726638f74c5b363a91e154f858480c077c51a
This commit is contained in:
@@ -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.");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user