Skip to content

Commit

Permalink
Initialize file size for MatacqProducer::msize
Browse files Browse the repository at this point in the history
  • Loading branch information
perrotta committed Jun 29, 2021
1 parent 194eb7b commit 3a907cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions EventFilter/EcalRawToDigi/plugins/MatacqProducer.cc
Expand Up @@ -931,8 +931,10 @@ bool MatacqProducer::mread(char* buf, size_t n, const char* mess, bool peek) {
}

bool MatacqProducer::msize(filepos_t& s) {
if (inFile_.get() == 0)
if (inFile_.get() == 0) {
s = 0;
return false;
}
s = inFile_.get()->size();
return true;
}
Expand Down Expand Up @@ -1040,8 +1042,10 @@ bool MatacqProducer::mread(char* buf, size_t n, const char* mess, bool peek) {
}

bool MatacqProducer::msize(filepos_t& s) {
if (nullptr == inFile_)
if (nullptr == inFile_) {
s = 0;
return false;
}
struct stat buf;
if (0 != fstat(fileno(inFile_), &buf)) {
s = 0;
Expand Down

0 comments on commit 3a907cf

Please sign in to comment.