mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Return false on error from the other place we call fstat()
This commit is contained in:
parent
529a3d8e77
commit
6b52c5b2f9
1 changed files with 4 additions and 5 deletions
|
@ -298,13 +298,12 @@ bool Raw::OpenInput()
|
|||
struct stat sb;
|
||||
if ( fstat(fileno(file.get()), &sb) == -1 )
|
||||
{
|
||||
// This is unlikely to fail
|
||||
Error(Fmt("Could not get fstat for %s", fname.c_str()));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ino = sb.st_ino;
|
||||
dev = sb.st_dev;
|
||||
}
|
||||
ino = sb.st_ino;
|
||||
dev = sb.st_dev;
|
||||
}
|
||||
|
||||
if ( ! SetFDFlags(fileno(file.get()), F_SETFD, FD_CLOEXEC) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue