bootchart: fix check for no fd

found with coverty report
This commit is contained in:
Shawn Landden 2015-04-05 10:03:37 -07:00 committed by Daniel Mack
parent de9b34b6d4
commit eaf15609da
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ catch_rename:
/* re-fetch name */
/* get name, start time */
if (!ps->sched) {
if (ps->sched < 0) {
sprintf(filename, "%d/sched", pid);
ps->sched = openat(procfd, filename, O_RDONLY|O_CLOEXEC);
if (ps->sched < 0)