Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
battery: Minor coding style fixes
[slstatus.git]
/
components
/
entropy.c
diff --git
a/components/entropy.c
b/components/entropy.c
index
1450b31
..
606bfec
100644
(file)
--- a/
components/entropy.c
+++ b/
components/entropy.c
@@
-9,14
+9,18
@@
{
int num;
{
int num;
- return (pscanf("/proc/sys/kernel/random/entropy_avail",
- "%d", &num) == 1) ?
- bprintf("%d", num) : NULL;
+ if (pscanf("/proc/sys/kernel/random/entropy_avail",
+ "%d", &num) != 1) {
+ return NULL;
+ }
+
+ return bprintf("%d", num);
}
#elif defined(__OpenBSD__)
const char *
entropy(void)
{
}
#elif defined(__OpenBSD__)
const char *
entropy(void)
{
- return "∞";
+ /* Unicode Character 'INFINITY' (U+221E) */
+ return "\xe2\x88\x9e";
}
#endif
}
#endif