diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-01-12 14:29:32 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-01-12 15:26:40 -0800 |
commit | 6a504b5da5b1f660cc35a04a0513fcad2ccb2ca4 (patch) | |
tree | c84c26255568ebfcb5e52190eca09d98948a4449 /libusb/os/windows_winusb.h | |
parent | e89983a6b59439e21dfbecfe325d9e3a3c81dc91 (diff) | |
download | libusb-6a504b5da5b1f660cc35a04a0513fcad2ccb2ca4.tar.gz |
Windows: Clean up unnecessary variable initialization
Don't zero out variables that already are zero (calloc'ed) and
don't set variables that aren't read before being set again.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_winusb.h')
-rw-r--r-- | libusb/os/windows_winusb.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h index 7e00f93..b7b9cd9 100644 --- a/libusb/os/windows_winusb.h +++ b/libusb/os/windows_winusb.h @@ -228,22 +228,11 @@ static inline struct windows_device_priv *windows_device_priv_init(struct libusb struct windows_device_priv *p = _device_priv(dev); int i; - p->depth = 0; - p->port = 0; - p->path = NULL; p->apib = &usb_api_backend[USB_API_UNSUPPORTED]; p->sub_api = SUB_API_NOTSET; - p->hid = NULL; - p->active_config = 0; - p->config_descriptor = NULL; - memset(&p->dev_descriptor, 0, sizeof(USB_DEVICE_DESCRIPTOR)); for (i = 0; i < USB_MAXINTERFACES; i++) { - p->usb_interface[i].path = NULL; p->usb_interface[i].apib = &usb_api_backend[USB_API_UNSUPPORTED]; p->usb_interface[i].sub_api = SUB_API_NOTSET; - p->usb_interface[i].nb_endpoints = 0; - p->usb_interface[i].endpoint = NULL; - p->usb_interface[i].restricted_functionality = false; } return p; |