diff options
author | Andrew Duggan <aduggan@synaptics.com> | 2014-07-01 13:02:10 -0700 |
---|---|---|
committer | Andrew Duggan <aduggan@synaptics.com> | 2014-07-01 13:02:10 -0700 |
commit | 64d6e59480a797cd10fede1dc6b4e8c467185b32 (patch) | |
tree | e03a320a24bde4668e01b77b2e063511673a7565 /rmidevice | |
parent | 8b77439d5c8900ab307da3d207665920b52d949e (diff) | |
download | rmi4utils-64d6e59480a797cd10fede1dc6b4e8c467185b32.tar.gz |
Used signed variables to store the result from read/write.
Diffstat (limited to 'rmidevice')
-rw-r--r-- | rmidevice/hiddevice.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rmidevice/hiddevice.cpp b/rmidevice/hiddevice.cpp index 1345db2..473b552 100644 --- a/rmidevice/hiddevice.cpp +++ b/rmidevice/hiddevice.cpp @@ -199,7 +199,7 @@ void HIDDevice::ParseReportSizes() int HIDDevice::Read(unsigned short addr, unsigned char *buf, unsigned short len) { - size_t count; + ssize_t count; size_t bytesReadPerRequest; size_t bytesInDataReport; size_t totalBytesRead; @@ -264,7 +264,7 @@ int HIDDevice::Read(unsigned short addr, unsigned char *buf, unsigned short len) int HIDDevice::Write(unsigned short addr, const unsigned char *buf, unsigned short len) { - size_t count; + ssize_t count; if (!m_deviceOpen) return -1; @@ -363,7 +363,7 @@ int HIDDevice::GetAttentionReport(struct timeval * timeout, int *sources, unsign int HIDDevice::GetReport(int reportid, struct timeval * timeout) { - size_t count = 0; + ssize_t count = 0; unsigned char *queue_report; fd_set fds; int rc; @@ -472,4 +472,4 @@ void HIDDevice::PrintReport(const unsigned char *report) } } fprintf(stdout, "\n\n"); -}
\ No newline at end of file +} |