summaryrefslogtreecommitdiffstats
path: root/src/device.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-01-09 11:31:49 +0100
committerGravatar Nikias Bassen2014-01-09 11:31:49 +0100
commit678149cde792d30beca94ba6fc9ea20996f2febc (patch)
treed4427b08b3a900bb0e2e82921f98dae44f1f3017 /src/device.h
parentd04ce1b524f68dda6b75cfff69f70f4b4ad8e1d5 (diff)
downloadusbmuxd-678149cde792d30beca94ba6fc9ea20996f2febc.tar.gz
usbmuxd-678149cde792d30beca94ba6fc9ea20996f2febc.tar.bz2
device/client: make device_get_list() allocate the result buffer itself
Using device_get_count() and device_get_list() separately can return different device counts in case there are devices added to the list inbetween these two function calls. To prevent this, device_get_list() will allocate the buffer by itself.
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.h b/src/device.h
index 95d470e..cb5bc24 100644
--- a/src/device.h
+++ b/src/device.h
@@ -44,7 +44,7 @@ void device_set_visible(int device_id);
void device_set_preflight_cb_data(int device_id, void* data);
int device_get_count(int include_hidden);
-int device_get_list(int include_hidden, struct device_info *p);
+int device_get_list(int include_hidden, struct device_info **devices);
int device_get_timeout(void);
void device_check_timeouts(void);