Skip to content

Commit

Permalink
umockdev-ioctl: Assert device in IoctlTreeRecorder::flush_log()
Browse files Browse the repository at this point in the history
This should never be null, as the constructor does not accept null.
Quiesces Coverity complaint.
  • Loading branch information
martinpitt committed Nov 24, 2022
1 parent 92a88c4 commit 915a6c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/umockdev-ioctl.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ internal class IoctlTreeRecorder : IoctlBase {
if (!write_log)
return;

assert (device != null);

log = Posix.FILE.open(logfile, "w+");
log.printf("@DEV %s\n", device);
tree.write(log);
Expand Down

0 comments on commit 915a6c4

Please sign in to comment.