Skip to content

Commit 99731ff

Browse files
committed
Avoid using reserved identifiers
1 parent 15f7f31 commit 99731ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

smc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
static io_connect_t conn;
3030

31-
UInt32 _strtoul(const char *str, int size, int base) {
31+
UInt32 strtoulWithSize(const char *str, int size, int base) {
3232
UInt32 total = 0;
3333
int i;
3434

@@ -41,7 +41,7 @@ UInt32 _strtoul(const char *str, int size, int base) {
4141
return total;
4242
}
4343

44-
void _ultostr(char *str, UInt32 val) {
44+
void ultostr(char *str, UInt32 val) {
4545
str[0] = '\0';
4646
sprintf(str, "%c%c%c%c",
4747
(unsigned int) val >> 24,
@@ -115,15 +115,15 @@ kern_return_t SMCReadKey(UInt32Char_t key, SMCVal_t *val) {
115115
memset(&outputStructure, 0, sizeof(SMCKeyData_t));
116116
memset(val, 0, sizeof(SMCVal_t));
117117

118-
inputStructure.key = _strtoul(key, 4, 16);
118+
inputStructure.key = strtoulWithSize(key, 4, 16);
119119
inputStructure.data8 = SMC_CMD_READ_KEYINFO;
120120

121121
result = SMCCall(KERNEL_INDEX_SMC, &inputStructure, &outputStructure);
122122
if (result != kIOReturnSuccess)
123123
return result;
124124

125125
val->dataSize = outputStructure.keyInfo.dataSize;
126-
_ultostr(val->dataType, outputStructure.keyInfo.dataType);
126+
ultostr(val->dataType, outputStructure.keyInfo.dataType);
127127
inputStructure.keyInfo.dataSize = val->dataSize;
128128
inputStructure.data8 = SMC_CMD_READ_BYTES;
129129

0 commit comments

Comments
 (0)