From b94569b27b29f50555d25548b95282cc6fda002f Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sat, 18 Jul 2009 10:49:16 +0200 Subject: [PATCH 1/2] Fix reloading config without X11 --- src/conky.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index 8f47d295..f82b522e 100644 --- a/src/conky.c +++ b/src/conky.c @@ -7463,6 +7463,7 @@ void clean_up(void *memtofree1, void* memtofree2) x_initialised = NO; }else{ free(fonts); //in set_default_configurations a font is set but not loaded + font_count = -1; } #endif /* X11 */ @@ -7952,7 +7953,7 @@ static void load_config_file(const char *f) CONF2("out_to_x") { /* don't listen if X is already initialised or * if we already know we don't want it */ - if(x_initialised == NO) { + if(x_initialised != YES) { if (string_to_bool(value)) { output_methods &= TO_X; } else { From 4284490080859108015960be6a8bfc5baad6f30f Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sat, 18 Jul 2009 11:37:15 +0200 Subject: [PATCH 2/2] If nothing is read, n1 and n2 are not guaranteed to be 0 --- src/conky.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index f82b522e..9809943d 100644 --- a/src/conky.c +++ b/src/conky.c @@ -2941,7 +2941,7 @@ static struct text_object *construct_text_object(const char *s, CRIT_ERR(obj, free_at_crash, "to_bytes needs a argument"); } END OBJ(scroll, 0) - int n1, n2; + int n1 = 0, n2 = 0; obj->data.scroll.step = 1; if (arg && sscanf(arg, "%u %n", &obj->data.scroll.show, &n1) > 0) {