mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-02 18:48:26 +00:00
Fixed a warning by compiling on fedora 37
This commit is contained in:
parent
d98fdf4b2e
commit
d8e4e34b74
@ -212,13 +212,12 @@ bool S3fsLog::LowSetLogfile(const char* pfile)
|
||||
|
||||
// switch new log file and close old log file if it is opened
|
||||
FILE* oldfp = S3fsLog::logfp;
|
||||
S3fsLog::logfp = newfp;
|
||||
if(oldfp && 0 != fclose(oldfp)){
|
||||
S3FS_PRN_ERR("Could not close old log file(%s).", (S3fsLog::plogfile ? S3fsLog::plogfile->c_str() : "null"));
|
||||
S3fsLog::logfp = oldfp;
|
||||
fclose(newfp);
|
||||
return false;
|
||||
}
|
||||
S3fsLog::logfp = newfp;
|
||||
delete S3fsLog::plogfile;
|
||||
S3fsLog::plogfile = new std::string(pfile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user