From: Colin Ian King colin.king@canonical.com
clang's scan-build detected the following error "Undefined or garbage value returned to caller" because ret is not intialised.
Signed-off-by: Colin Ian King colin.king@canonical.com --- idlestat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/idlestat.c b/idlestat.c index 4d773f4..ede98a0 100644 --- a/idlestat.c +++ b/idlestat.c @@ -1229,7 +1229,7 @@ static int idlestat_file_for_each_line(const char *path, void *data, int (*handler)(const char *, void *)) { FILE *f; - int ret; + int ret = 0;
if (!handler) return -1;
On Wed, Sep 9, 2015 at 3:34 PM, Colin King colin.king@canonical.com wrote:
From: Colin Ian King colin.king@canonical.com
clang's scan-build detected the following error "Undefined or garbage value returned to caller" because ret is not intialised.
Signed-off-by: Colin Ian King colin.king@canonical.com
idlestat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/idlestat.c b/idlestat.c index 4d773f4..ede98a0 100644 --- a/idlestat.c +++ b/idlestat.c @@ -1229,7 +1229,7 @@ static int idlestat_file_for_each_line(const char *path, void *data, int (*handler)(const char *, void *)) { FILE *f;
int ret;
int ret = 0; if (!handler) return -1;
-- 2.5.0
Applied to tip. Apologies for the delay.