summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libusb/core.c3
-rw-r--r--libusb/libusb.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/libusb/core.c b/libusb/core.c
index 5104f68..1d5c9b3 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -312,7 +312,7 @@ if (cfg != desired)
* The default context is reference-counted and can be shared. That means that
* if libusb_init(NULL) is called twice within the same process, the two
* users end up sharing the same context. The deinitialization and freeing of
- * the default context will only happen when the last user calls libusb_exit()
+ * the default context will only happen when the last user calls libusb_exit().
* In other words, the default context is created and initialized when its
* reference count goes from 0 to 1, and is deinitialized and destroyed when
* its reference count goes from 1 to 0.
@@ -1560,7 +1560,6 @@ API_EXPORTED int LIBUSB_API libusb_init(libusb_context **context)
usbi_default_context = ctx;
default_context_refcnt++;
}
- usbi_mutex_static_unlock(&default_context_lock);
return 0;
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 7e31b60..31500f0 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1206,7 +1206,7 @@ static inline int libusb_get_string_descriptor(libusb_device_handle *dev,
uint8_t desc_index, uint16_t langid, unsigned char *data, int length)
{
return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index),
+ LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index,
langid, data, (uint16_t) length, 1000);
}