temperature: Improve types
This commit is contained in:
parent
ab4f24a612
commit
d1e3398822
1 changed files with 5 additions and 3 deletions
|
@ -4,16 +4,18 @@
|
||||||
#include "../util.h"
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
temp(const char *file)
|
temp(const char *file)
|
||||||
{
|
{
|
||||||
int temp;
|
uint64_t temp;
|
||||||
|
|
||||||
if(pscanf(file, "%d", &temp) != 1) {
|
if(pscanf(file, "%" PRIu64, &temp) != 1) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return bprintf("%d", temp / 1000);
|
return bprintf("%" PRIu64, temp / 1000);
|
||||||
}
|
}
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Reference in a new issue