]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootchart: fix check for no fd
authorShawn Landden <shawn@churchofgit.com>
Sun, 5 Apr 2015 17:03:37 +0000 (10:03 -0700)
committerDaniel Mack <daniel@zonque.org>
Sun, 5 Apr 2015 19:20:23 +0000 (21:20 +0200)
found with coverty report

src/bootchart/store.c

index f19427e93d6470393c098a0fb8d05397f23bfcbe..f159cbafe2a226bc4d171603875f81f50eaa1ad3 100644 (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)