Skip to content

Commit 383a419

Browse files
CarterLiCopilot
andcommitted
Comon (macOS): tidy
Co-authored-by: Copilot <copilot@github.com>
1 parent 42f2e5a commit 383a419

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/common/apple/cf_helpers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const char* ffCfNumGetInt(CFTypeRef cf, int32_t* result) {
2424
}
2525
return NULL;
2626
} else if (CFGetTypeID(cf) == CFDataGetTypeID()) {
27-
if (CFDataGetLength((CFDataRef) cf) != sizeof(int)) {
28-
return "Data length is not sizeof(int)";
27+
if (CFDataGetLength((CFDataRef) cf) != sizeof(*result)) {
28+
return "Data length is not sizeof(int32_t)";
2929
}
30-
CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(int)), (uint8_t*) result);
30+
CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(*result)), (uint8_t*) result);
3131
return NULL;
3232
}
3333

src/common/apple/osascript.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "osascript.h"
22

33
#import <Foundation/Foundation.h>
4-
#import <AppKit/AppKit.h>
5-
#import <CoreData/CoreData.h>
64

75
bool ffOsascript(const char* input, FFstrbuf* result)
86
{

src/common/apple/smc_temps.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "common/stringUtils.h"
44

55
#include <stdint.h>
6-
#include <math.h>
76
#include <IOKit/IOKitLib.h>
87

98
static const char kSmcCmdReadBytes = 5;

0 commit comments

Comments
 (0)