diff options
author | Sami Kerola <sami.kerola@tomtom.com> | 2012-01-04 15:02:07 +0100 |
---|---|---|
committer | Craig Small <csmall@users.sourceforge.net> | 2012-01-25 21:49:15 +1100 |
commit | 9944a8a5a50829a20295c12a202e4f3b30787b21 (patch) | |
tree | ff01e80a3df7d63f533699b54736f56430950355 | |
parent | acb39bbb4900f18eecd3956049f2411bdb6944ba (diff) |
killall: check fscanf return value
killall.c:138:10: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
-rw-r--r-- | src/killall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/killall.c b/src/killall.c index a273678..656a335 100644 --- a/src/killall.c +++ b/src/killall.c @@ -135,7 +135,7 @@ uptime() } savelocale = setlocale(LC_NUMERIC, NULL); setlocale(LC_NUMERIC,"C"); - fscanf(file, "%s", buf); + if (fscanf(file, "%s", buf) == EOF) perror("uptime"); fclose(file); setlocale(LC_NUMERIC,savelocale); return atof(buf); |