Comon (macOS): tidy

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
李通洲
2026-04-30 13:26:46 +08:00
parent 42f2e5a745
commit 383a4190ca
3 changed files with 3 additions and 6 deletions
+3 -3
View File
@@ -24,10 +24,10 @@ const char* ffCfNumGetInt(CFTypeRef cf, int32_t* result) {
}
return NULL;
} else if (CFGetTypeID(cf) == CFDataGetTypeID()) {
if (CFDataGetLength((CFDataRef) cf) != sizeof(int)) {
return "Data length is not sizeof(int)";
if (CFDataGetLength((CFDataRef) cf) != sizeof(*result)) {
return "Data length is not sizeof(int32_t)";
}
CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(int)), (uint8_t*) result);
CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(*result)), (uint8_t*) result);
return NULL;
}
-2
View File
@@ -1,8 +1,6 @@
#include "osascript.h"
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <CoreData/CoreData.h>
bool ffOsascript(const char* input, FFstrbuf* result)
{
-1
View File
@@ -3,7 +3,6 @@
#include "common/stringUtils.h"
#include <stdint.h>
#include <math.h>
#include <IOKit/IOKitLib.h>
static const char kSmcCmdReadBytes = 5;