diff options
author | Colin Ian King <colin.king@canonical.com> | 2015-09-09 11:04:21 +0100 |
---|---|---|
committer | Amit Kucheria <amit.kucheria@linaro.org> | 2015-11-04 12:21:32 +0530 |
commit | 7398755f136d551c03ebc1e784625e9e3f77c1de (patch) | |
tree | 2185b784a558fe77dab855051c3e2174cc4c1372 | |
parent | 5f2b8b0060067ea122f6d89d35b5f859a68cc3ec (diff) |
initialise ret to 0, fixes an error found by static analysisidlestat-0.6
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>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r-- | idlestat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |