diff --git a/src/conky.c b/src/conky.c index 50daaf6e..d278e85f 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1336,8 +1336,8 @@ static struct text_object *construct_text_object(const char *s, END OBJ(buffers, INFO_BUFFERS) END OBJ(cached, INFO_BUFFERS) #define SCAN_CPU(__arg, __var) { \ - int __offset; \ - if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset) == 2) \ + int __offset = 0; \ + if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset) > 0) \ __arg += __offset; \ else \ __var = 0; \