Rename function to destroy a list of USB devices

Rename from "usb_device_" to "usb_devices_".

PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
This commit is contained in:
Romain Vimont 2022-02-05 18:09:02 +01:00
parent 6df2205cf3
commit 0eadf95a3e
4 changed files with 4 additions and 4 deletions

View file

@ -442,7 +442,7 @@ scrcpy(struct scrcpy_options *options) {
if (count > 1) { if (count > 1) {
LOGE("Multiple (%d) devices with serial %s", (int) count, serial); LOGE("Multiple (%d) devices with serial %s", (int) count, serial);
sc_usb_device_destroy_all(usb_devices, count); sc_usb_devices_destroy_all(usb_devices, count);
sc_usb_destroy(&s->usb); sc_usb_destroy(&s->usb);
sc_acksync_destroy(&s->acksync); sc_acksync_destroy(&s->acksync);
goto aoa_hid_end; goto aoa_hid_end;

View file

@ -115,7 +115,7 @@ scrcpy_otg(struct scrcpy_options *options) {
if (!serial) { if (!serial) {
LOGE("Specify the device via -s or --serial"); LOGE("Specify the device via -s or --serial");
} }
sc_usb_device_destroy_all(usb_devices, count); sc_usb_devices_destroy_all(usb_devices, count);
goto end; goto end;
} }
usb_device_initialized = true; usb_device_initialized = true;

View file

@ -79,7 +79,7 @@ sc_usb_device_destroy(struct sc_usb_device *usb_device) {
} }
void void
sc_usb_device_destroy_all(struct sc_usb_device *usb_devices, size_t count) { sc_usb_devices_destroy_all(struct sc_usb_device *usb_devices, size_t count) {
for (size_t i = 0; i < count; ++i) { for (size_t i = 0; i < count; ++i) {
sc_usb_device_destroy(&usb_devices[i]); sc_usb_device_destroy(&usb_devices[i]);
} }

View file

@ -41,7 +41,7 @@ void
sc_usb_device_destroy(struct sc_usb_device *usb_device); sc_usb_device_destroy(struct sc_usb_device *usb_device);
void void
sc_usb_device_destroy_all(struct sc_usb_device *usb_devices, size_t count); sc_usb_devices_destroy_all(struct sc_usb_device *usb_devices, size_t count);
bool bool
sc_usb_init(struct sc_usb *usb); sc_usb_init(struct sc_usb *usb);