Skip to content

Commit 0324a0b

Browse files
iakovQbicz
authored andcommitted
Codestyle conformance: add spaces after type-case
1 parent 7d08fd9 commit 0324a0b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mac/hid.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t
227227
if (!len)
228228
return 0;
229229

230-
str = (CFStringRef)IOHIDDeviceGetProperty(device, prop);
230+
str = (CFStringRef) IOHIDDeviceGetProperty(device, prop);
231231

232232
buf[0] = 0;
233233

@@ -240,11 +240,11 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t
240240
len --;
241241

242242
range.location = 0;
243-
range.length = ((size_t)str_len > len)? len: (size_t)str_len;
243+
range.length = ((size_t) str_len > len)? len: (size_t) str_len;
244244
chars_copied = CFStringGetBytes(str,
245245
range,
246246
kCFStringEncodingUTF32LE,
247-
(char)'?',
247+
(char) '?',
248248
FALSE,
249249
(UInt8*)buf,
250250
len * sizeof(wchar_t),
@@ -308,7 +308,7 @@ static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device)
308308
iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
309309

310310
if (iokit_framework != NULL)
311-
dynamic_IOHIDDeviceGetService = (dynamic_IOHIDDeviceGetService_t)dlsym(iokit_framework, "IOHIDDeviceGetService");
311+
dynamic_IOHIDDeviceGetService = (dynamic_IOHIDDeviceGetService_t) dlsym(iokit_framework, "IOHIDDeviceGetService");
312312
}
313313

314314
if (dynamic_IOHIDDeviceGetService != NULL) {
@@ -340,7 +340,7 @@ static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device)
340340
#endif
341341
io_service_t service;
342342
};
343-
struct IOHIDDevice_internal *tmp = (struct IOHIDDevice_internal *)device;
343+
struct IOHIDDevice_internal *tmp = (struct IOHIDDevice_internal *) device;
344344

345345
return tmp->service;
346346
}
@@ -556,7 +556,7 @@ static void hid_device_removal_callback(void *context, IOReturn result,
556556
void *sender)
557557
{
558558
/* Stop the Run Loop for this device. */
559-
hid_device *d = (hid_device*)context;
559+
hid_device *d = (hid_device*) context;
560560

561561
d->disconnected = 1;
562562
CFRunLoopStop(d->run_loop);
@@ -570,7 +570,7 @@ static void hid_report_callback(void *context, IOReturn result, void *sender,
570570
uint8_t *report, CFIndex report_length)
571571
{
572572
struct input_report *rpt;
573-
hid_device *dev = (hid_device*)context;
573+
hid_device *dev = (hid_device*) context;
574574

575575
/* Make a new Input Report object */
576576
rpt = (input_report*) calloc(1, sizeof(struct input_report));
@@ -617,13 +617,13 @@ static void hid_report_callback(void *context, IOReturn result, void *sender,
617617
hid_close(), and serves to stop the read_thread's run loop. */
618618
static void perform_signal_callback(void *context)
619619
{
620-
hid_device *dev = (hid_device*)context;
620+
hid_device *dev = (hid_device*) context;
621621
CFRunLoopStop(dev->run_loop); /*TODO: CFRunLoopGetCurrent()*/
622622
}
623623

624624
static void *read_thread(void *param)
625625
{
626-
hid_device *dev = (hid_device*)param;
626+
hid_device *dev = (hid_device*) param;
627627
SInt32 code;
628628

629629
/* Move the device's run loop to this thread. */

0 commit comments

Comments
 (0)