mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-09-28 17:29:02 +00:00
Merge pull request #1441 from gaul/coverity
Suppress false positive from Coverity
This commit is contained in:
commit
cf86fa51b0
@ -751,13 +751,14 @@ bool PageList::Serialize(CacheFileStat& file, bool is_output, ino_t inode)
|
||||
return true;
|
||||
}
|
||||
char* ptmp = new char[st.st_size + 1];
|
||||
ptmp[st.st_size] = '\0';
|
||||
int res;
|
||||
// read from file
|
||||
if(0 >= pread(file.GetFd(), ptmp, st.st_size, 0)){
|
||||
if(0 >= (res = pread(file.GetFd(), ptmp, st.st_size, 0))){
|
||||
S3FS_PRN_ERR("failed to read stats(%d)", errno);
|
||||
delete[] ptmp;
|
||||
return false;
|
||||
}
|
||||
ptmp[res] = '\0';
|
||||
std::string oneline;
|
||||
std::istringstream ssall(ptmp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user