You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.
Just something I noticed while merging in some of your recent changes. You are using snprintf inside the loop to space-pad the passed in 'name' to getKey:
while ((key = OSDynamicCast(FakeSMCKey, iterator->getNextObject()))) {
// Made the key name valid (4 char long): add trailing spaces if needed
char validKeyNameBuffer[5];
snprintf(validKeyNameBuffer, 5, "%-4s", name);
...
Since 'name' is invariant, the creation of validKeyNameBuffer can be moved outside the loop for efficiency:
// Made the key name valid (4 char long): add trailing spaces if needed
char validKeyNameBuffer[5];
snprintf(validKeyNameBuffer, 5, "%-4s", name);
while ((key = OSDynamicCast(FakeSMCKey, iterator->getNextObject()))) {
...
The text was updated successfully, but these errors were encountered:
Just something I noticed while merging in some of your recent changes. You are using snprintf inside the loop to space-pad the passed in 'name' to getKey:
Since 'name' is invariant, the creation of validKeyNameBuffer can be moved outside the loop for efficiency:
The text was updated successfully, but these errors were encountered: