From c1e47013efacf04ec2c66858d05b451b67e20e50 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Thu, 7 May 2009 18:44:45 +0200 Subject: [PATCH 1/2] Bugfix: sometimes segfaults with cpubar --- src/conky.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index 020eb4e0..fef25558 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1296,7 +1296,7 @@ static struct text_object *construct_text_object(const char *s, END OBJ(cached, INFO_BUFFERS) #define SCAN_CPU(__arg, __var) { \ int __offset; \ - if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset)) \ + if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset) == 2) \ __arg += __offset; \ else \ __var = 0; \ From 3b6f4c767a150764da5923f10d32844b219a56ca Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Thu, 7 May 2009 12:48:54 -0600 Subject: [PATCH 2/2] Update changelog for last commit. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 71dc29b1..fc134965 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-05-07 + * Fix occasional cpubar segfaults + 2009-05-05 * Added some completely pointless OpenMP optimizations(?)