Skip to content

Commit

Permalink
liblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD
Browse files Browse the repository at this point in the history
I didn't test this but it shouldn't change any functionality.

Fixes: 761f5b6
  • Loading branch information
Larhzu committed Apr 10, 2024
1 parent 1024cd4 commit fc43cec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/liblzma/check/crc32_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ is_arch_extension_supported(void)
// CPU feature it tests. The Apple documentation lists the string
// "hw.optional.armv8_crc32", which can be found here:
// https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3915619
int err = sysctlbyname("hw.optional.armv8_crc32", &has_crc32,
&size, NULL, 0);
if (sysctlbyname("hw.optional.armv8_crc32", &has_crc32,
&size, NULL, 0) != 0)
return false;

return !err && has_crc32;
return has_crc32;

#else
// If a runtime detection method cannot be found, then this must
Expand Down

0 comments on commit fc43cec

Please sign in to comment.