Use C++11 nullptr instead of 0 or NULL (#2234)

This improves type-safety.
This commit is contained in:
Andrew Gaul
2023-07-27 21:56:58 +09:00
committed by GitHub
parent 0ece204393
commit a4a2841c05
46 changed files with 537 additions and 538 deletions

View File

@ -65,7 +65,7 @@ static bool abort_incomp_mpu_list(incomp_mpu_list_t& list, time_t abort_time)
if(list.empty()){
return true;
}
time_t now_time = time(NULL);
time_t now_time = time(nullptr);
// do removing.
S3fsCurl s3fscurl;
@ -116,7 +116,7 @@ int s3fs_utility_processing(time_t abort_time)
S3FS_PRN_DBG("response body = {\n%s\n}", body.c_str());
xmlDocPtr doc;
if(NULL == (doc = xmlReadMemory(body.c_str(), static_cast<int>(body.size()), "", NULL, 0))){
if(nullptr == (doc = xmlReadMemory(body.c_str(), static_cast<int>(body.size()), "", nullptr, 0))){
S3FS_PRN_DBG("xmlReadMemory exited with error.");
result = EXIT_FAILURE;