1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

Access graph id through g->id

struct graph * is already available through g variable, let's use it
directly.
This commit is contained in:
Petr Vaněk 2021-08-05 19:29:54 +02:00 committed by Brenden Matthews
parent 3afb405359
commit 18d5aebc46

View File

@ -596,12 +596,11 @@ void new_graph(struct text_object *obj, char *buf, int buf_max_size,
} }
#endif #endif
int graph_id = ((struct graph *)obj->special_data)->id; s->graph = retrieve_graph(g->id, s->graph_width);
s->graph = retrieve_graph(graph_id, s->graph_width);
graph_append(s, val, g->flags); graph_append(s, val, g->flags);
store_graph(graph_id, s); store_graph(g->id, s);
if (out_to_stdout.get(*state)) { new_graph_in_shell(s, buf, buf_max_size); } if (out_to_stdout.get(*state)) { new_graph_in_shell(s, buf, buf_max_size); }
} }