Style --- src/usb-backend.c | 17 +++++++++++------ src/usb-emulation.h | 8 ++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/usb-backend.c b/src/usb-backend.c index 0bf2eccf..f07009ad 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -197,7 +197,7 @@ static int compare_dev_list_fire_callback(SpiceUsbBackend *be, } static LRESULT subclass_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, - UINT_PTR uIdSubclass, DWORD_PTR dwRefData) + UINT_PTR uIdSubclass, DWORD_PTR dwRefData) { SpiceUsbBackend *be = (SpiceUsbBackend *)dwRefData; if (uMsg == WM_DEVICECHANGE && !be->redirecting) { @@ -303,14 +303,16 @@ static int enable_hotplug_support(SpiceUsbBackend *be, const char **error_on_ena return rc; } -static inline void set_redirecting(SpiceUsbBackend *be, gboolean on) { +static inline void set_redirecting(SpiceUsbBackend *be, gboolean on) +{ /* nothing on Linux */ } #endif /* lock functions for usbredirhost and usbredirparser */ -static void *usbredir_alloc_lock(void) { +static void *usbredir_alloc_lock(void) +{ GMutex *mutex; mutex = g_new0(GMutex, 1); @@ -319,20 +321,23 @@ static void *usbredir_alloc_lock(void) { return mutex; } -static void usbredir_free_lock(void *user_data) { +static void usbredir_free_lock(void *user_data) +{ GMutex *mutex = user_data; g_mutex_clear(mutex); g_free(mutex); } -static void usbredir_lock_lock(void *user_data) { +static void usbredir_lock_lock(void *user_data) +{ GMutex *mutex = user_data; g_mutex_lock(mutex); } -static void usbredir_unlock_lock(void *user_data) { +static void usbredir_unlock_lock(void *user_data) +{ GMutex *mutex = user_data; g_mutex_unlock(mutex); diff --git a/src/usb-emulation.h b/src/usb-emulation.h index 44733615..b3654bf7 100644 --- a/src/usb-emulation.h +++ b/src/usb-emulation.h @@ -25,7 +25,7 @@ #include "usbredirparser.h" #include "usb-backend.h" -typedef struct _SpiceUsbEmulatedDevice SpiceUsbEmulatedDevice; +typedef struct SpiceUsbEmulatedDevice SpiceUsbEmulatedDevice; typedef int (*SpiceUsbEmulatedDeviceCreate)(SpiceUsbBackend *be, SpiceUsbBackendDevice *parent, UsbCreateDeviceParameters *param, @@ -36,8 +36,7 @@ typedef int (*SpiceUsbEmulatedDeviceCreate)(SpiceUsbBackend *be, must be first member of device structure all functions are mandatory for implementation */ -typedef struct UsbDeviceOps -{ +typedef struct UsbDeviceOps { gboolean (*get_descriptor)(SpiceUsbEmulatedDevice *device, uint8_t type, uint8_t index, void **buffer, uint16_t *size); @@ -75,7 +74,8 @@ typedef struct UsbDeviceOps void (*delete)(SpiceUsbEmulatedDevice *device); } UsbDeviceOps; -static inline const UsbDeviceOps *device_ops(SpiceUsbEmulatedDevice *dev) { +static inline const UsbDeviceOps *device_ops(SpiceUsbEmulatedDevice *dev) +{ return (const UsbDeviceOps *)dev; } -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel