Simplify the conditional compilation
Move the global variables inside an existing conditionally compiled block, to remove some of the #ifdef's.
This commit is contained in:
parent
931d1857ce
commit
f992d201ad
14
src/usbhid.c
14
src/usbhid.c
@ -107,6 +107,12 @@ static const dc_iostream_vtable_t dc_usbhid_vtable = {
|
|||||||
dc_usbhid_close, /* close */
|
dc_usbhid_close, /* close */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static dc_mutex_t g_usbhid_mutex = DC_MUTEX_INIT;
|
||||||
|
static size_t g_usbhid_refcount = 0;
|
||||||
|
#ifdef USE_LIBUSB
|
||||||
|
static libusb_context *g_usbhid_ctx = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(USE_LIBUSB)
|
#if defined(USE_LIBUSB)
|
||||||
static dc_status_t
|
static dc_status_t
|
||||||
syserror(int errcode)
|
syserror(int errcode)
|
||||||
@ -129,14 +135,6 @@ syserror(int errcode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USBHID
|
|
||||||
static dc_mutex_t g_usbhid_mutex = DC_MUTEX_INIT;
|
|
||||||
static size_t g_usbhid_refcount = 0;
|
|
||||||
#ifdef USE_LIBUSB
|
|
||||||
static libusb_context *g_usbhid_ctx = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dc_mutex_lock (dc_mutex_t *mutex)
|
dc_mutex_lock (dc_mutex_t *mutex)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user