Skip to content

Commit 9d569ba

Browse files
iakovYouw
authored andcommitted
Add missed NULL initialisation to local variable
Co-Authored-By: Ihor Dutchak <[email protected]>
1 parent 0324a0b commit 9d569ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mac/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device)
298298
{
299299
static void *iokit_framework = NULL;
300300
typedef io_service_t (*dynamic_IOHIDDeviceGetService_t)(IOHIDDeviceRef device);
301-
static dynamic_IOHIDDeviceGetService_t dynamic_IOHIDDeviceGetService;
301+
static dynamic_IOHIDDeviceGetService_t dynamic_IOHIDDeviceGetService = NULL;
302302

303303
/* Use dlopen()/dlsym() to get a pointer to IOHIDDeviceGetService() if it exists.
304304
* If any of these steps fail, dynamic_IOHIDDeviceGetService will be left NULL

0 commit comments

Comments
 (0)