In the docs, the following code is shown inside an IOHIDCallbackFunction:
// Only intersted in 32 values right now
if ((event.longValueSize != 0) && (event.longValue != NULL))
{
free(event.longValue);
continue;
}
What if longValueSize != 0, but longValue == NULL?
Is it appropriate to assume that if event.longValueSize is non-zero,
event.value can be disregarded?
If so, wouldn't it make more sense for the code to be written as follows?
if (event.longValueSize != 0) {
if (event.longValue != NULL) {
free(event.longValue);
}
break;
}
Thanks,
Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden