CPU: cleanup sysctl_int method

Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
Alexander Bayandin 2022-11-16 10:51:59 +00:00 committed by GitHub
parent 449b872916
commit f9b4bf9316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,11 +152,7 @@ module Hardware
end
def sysctl_int(key)
if (x = sysctl_n(key).to_i) >= 0
x
else
x & 0xffffffff
end
sysctl_n(key).to_i & 0xffffffff
end
def sysctl_n(*keys)