fix issue identified by coverity
Costa Tsaousis (ktsaou) committed
Sep 10, 2017 at 14:42 UTC
0852ce6be954ad906d871e0f989362600788e9cb
2 files changed
+5
-2
coverity-scan.sh
+3
-1
@@ -35,9 +35,11 @@ make clean || exit 1
35
36
"${covbuild}" --dir cov-int make -j${cpus} || exit 1
37
38
+echo >&2 "Compressing data..."
39
tar czvf netdata-coverity-analysis.tgz cov-int || exit 1
40
40
-curl --form token="${token}" \
41
+echo >&2 "Sending analysis..."
42
+curl --progress-bar --form token="${token}" \
43
--form email=costa@tsaousis.gr \
44
--form file=@netdata-coverity-analysis.tgz \
45
--form version="${version}" \
src/proc_stat.c
+2
-1
@@ -47,9 +47,10 @@ static int read_per_core_files(struct cpu_chart *all_cpu_charts, size_t len, siz
47
48
if(unlikely(f->fd == -1)) {
49
f->fd = open(f->filename, O_RDONLY);
50
- if (unlikely(f->fd == -1))
50
+ if (unlikely(f->fd == -1)) {
51
error("Cannot open file '%s'", f->filename);
52
continue;
53
+ }
54
}
55
56
ssize_t ret = read(f->fd, buf, 50);