Message ID | 20190904075500.6c296198@oasis.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | ed1b47c748d306c78961883ec325703307e4606e |
Headers | show |
Series | trace-cmd: Fix typo in use of file descriptor in conditional | expand |
diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c index 0bd0657..650b259 100644 --- a/lib/trace-cmd/trace-recorder.c +++ b/lib/trace-cmd/trace-recorder.c @@ -244,7 +244,7 @@ tracecmd_create_buffer_recorder_maxkb(const char *file, int cpu, unsigned flags, goto out; fd2 = open(file2, O_RDWR | O_CREAT | O_TRUNC | O_LARGEFILE, 0644); - if (fd < 0) + if (fd2 < 0) goto err; recorder = tracecmd_create_buffer_recorder_fd2(fd, fd2, cpu, flags, buffer, maxkb);