1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

i8k: print 'error' for i8k variables if /proc/i8k could not be read

this behavior was already present for the status variables but not others
This commit is contained in:
bi4k8 2023-05-05 00:49:43 +00:00 committed by bi4k8
parent feb6a08537
commit 804631f848

View File

@ -139,7 +139,8 @@ void print_i8k_ac_status(struct text_object *obj, char *p,
void print_i8k_##name(struct text_object *obj, char *p, \
unsigned int p_max_size) { \
(void)obj; \
snprintf(p, p_max_size, "%s", i8k.name); \
const char *str = i8k.name ? i8k.name : "error"; \
snprintf(p, p_max_size, "%s", str); \
}
I8K_PRINT_GENERATOR(version)