diff options
author | Andrew Duggan <aduggan@synaptics.com> | 2014-04-03 16:25:12 -0700 |
---|---|---|
committer | Andrew Duggan <aduggan@synaptics.com> | 2014-04-03 16:25:12 -0700 |
commit | 72163587ac7cab93d0daca22a20a018dfa974633 (patch) | |
tree | 4526373ca4f35ae30740e28524526457fa50fec6 /rmidevice/hiddevice.cpp | |
parent | 4e811258783e0f1e0cdaf70e3bdb2069ce4f0465 (diff) | |
download | rmi4utils-72163587ac7cab93d0daca22a20a018dfa974633.tar.gz |
Add support for compiling for Android.
Diffstat (limited to 'rmidevice/hiddevice.cpp')
-rw-r--r-- | rmidevice/hiddevice.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rmidevice/hiddevice.cpp b/rmidevice/hiddevice.cpp index 773ca38..433b4d0 100644 --- a/rmidevice/hiddevice.cpp +++ b/rmidevice/hiddevice.cpp @@ -45,6 +45,9 @@ int HIDDevice::Open(const char * filename) int rc; int desc_size; + if (!filename) + return -EINVAL; + m_fd = open(filename, O_RDWR); if (m_fd < 0) return -1; @@ -261,7 +264,7 @@ int HIDDevice::GetAttentionReport(struct timeval * timeout, int *sources, unsign int HIDDevice::GetReport(int reportid, struct timeval * timeout) { - size_t count; + size_t count = 0; unsigned char *queue_report; fd_set fds; int rc; |