mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 01:28:30 +00:00
simplify this conditional a bit
This commit is contained in:
parent
bad6d62b31
commit
bb72583a95
@ -156,18 +156,15 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
obj->callbacks.print = &new_fg;
|
obj->callbacks.print = &new_fg;
|
||||||
} else
|
} else
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
#ifdef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
OBJ(freq, 0)
|
|
||||||
obj->callbacks.print = &print_freq;
|
|
||||||
#else
|
|
||||||
OBJ(acpitemp, 0)
|
OBJ(acpitemp, 0)
|
||||||
obj->data.i = open_acpi_temperature(arg);
|
obj->data.i = open_acpi_temperature(arg);
|
||||||
obj->callbacks.print = &print_acpitemp;
|
obj->callbacks.print = &print_acpitemp;
|
||||||
obj->callbacks.free = &free_acpitemp;
|
obj->callbacks.free = &free_acpitemp;
|
||||||
END OBJ(acpiacadapter, 0)
|
END OBJ(acpiacadapter, 0)
|
||||||
obj->callbacks.print = &print_acpiacadapter;
|
obj->callbacks.print = &print_acpiacadapter;
|
||||||
END OBJ(freq, 0)
|
|
||||||
#endif /* !__OpenBSD__ */
|
#endif /* !__OpenBSD__ */
|
||||||
|
END OBJ(freq, 0)
|
||||||
get_cpu_count();
|
get_cpu_count();
|
||||||
if (!arg || !isdigit(arg[0]) || strlen(arg) >= 2 || atoi(&arg[0]) == 0
|
if (!arg || !isdigit(arg[0]) || strlen(arg) >= 2 || atoi(&arg[0]) == 0
|
||||||
|| atoi(&arg[0]) > info.cpu_count) {
|
|| atoi(&arg[0]) > info.cpu_count) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user