mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-09 12:22:42 +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
|
// switch new log file and close old log file if it is opened
|
||||||
FILE* oldfp = S3fsLog::logfp;
|
FILE* oldfp = S3fsLog::logfp;
|
||||||
S3fsLog::logfp = newfp;
|
|
||||||
if(oldfp && 0 != fclose(oldfp)){
|
if(oldfp && 0 != fclose(oldfp)){
|
||||||
S3FS_PRN_ERR("Could not close old log file(%s).", (S3fsLog::plogfile ? S3fsLog::plogfile->c_str() : "null"));
|
S3FS_PRN_ERR("Could not close old log file(%s).", (S3fsLog::plogfile ? S3fsLog::plogfile->c_str() : "null"));
|
||||||
S3fsLog::logfp = oldfp;
|
|
||||||
fclose(newfp);
|
fclose(newfp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
S3fsLog::logfp = newfp;
|
||||||
delete S3fsLog::plogfile;
|
delete S3fsLog::plogfile;
|
||||||
S3fsLog::plogfile = new std::string(pfile);
|
S3fsLog::plogfile = new std::string(pfile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user