From c0f75c2ed8366b73ed8189212aa05965b0a71acb Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 21 Oct 2008 15:07:41 +0200 Subject: [PATCH] widgets: clear private struct Signed-off-by: Julien Danjou --- widgets/graph.c | 2 ++ widgets/progressbar.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/widgets/graph.c b/widgets/graph.c index b81c06fec..ec107dcfa 100644 --- a/widgets/graph.c +++ b/widgets/graph.c @@ -112,6 +112,8 @@ graph_plot_add(graph_data_t *d, const char *title) { plot_t plot; + p_clear(&plot, 1); + plot.title = a_strdup(title); plot.values = p_new(float, d->size); plot.lines = p_new(int, d->size); diff --git a/widgets/progressbar.c b/widgets/progressbar.c index fceba6af7..c56a648b5 100644 --- a/widgets/progressbar.c +++ b/widgets/progressbar.c @@ -95,6 +95,8 @@ progressbar_bar_add(progressbar_data_t *d, const char *title) { bar_t bar; + p_clear(&bar, 1); + bar.title = a_strdup(title); bar.fg = globalconf.colors.fg; bar.fg_off = globalconf.colors.bg;