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:
Jef Driesen 2017-12-05 21:11:35 +01:00
parent 931d1857ce
commit f992d201ad

View File

@ -107,6 +107,12 @@ static const dc_iostream_vtable_t dc_usbhid_vtable = {
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)
static dc_status_t
syserror(int errcode)
@ -129,14 +135,6 @@ syserror(int errcode)
}
}
#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
dc_mutex_lock (dc_mutex_t *mutex)