commit 9b415ce6f5826b77f3427d64e388f5fbcd8cab11
parent 7e2bada685397f24d2c80fa1792a43dfec613a0f
Author: sin <sin@2f30.org>
Date: Tue, 17 May 2016 17:13:40 +0100
Fix compilation error
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/spoon.c b/spoon.c
@@ -96,12 +96,12 @@ int
cpuread(char *buf, size_t len)
{
int mib[2], cpuspeed;
- size_t len;
+ size_t sz;
mib[0] = CTL_HW;
mib[1] = HW_CPUSPEED;
- len = sizeof(cpuspeed);
- if (sysctl(mib, 2, &cpuspeed, &len, NULL, 0) < 0)
+ sz = sizeof(cpuspeed);
+ if (sysctl(mib, 2, &cpuspeed, &sz, NULL, 0) < 0)
return -1;
snprintf(buf, len, "%d", cpuspeed);
return 0;