*: use nullptr instead of NULL
This commit is contained in:
@@ -185,7 +185,7 @@ Bzip2ArchiveFile::OpenStream(const char *path,
|
||||
Bzip2InputStream *bis = new Bzip2InputStream(*this, path, mutex, cond);
|
||||
if (!bis->Open(error)) {
|
||||
delete bis;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return &bis->base;
|
||||
@@ -273,7 +273,7 @@ bz2_is_eof(struct input_stream *is)
|
||||
|
||||
static const char *const bz2_extensions[] = {
|
||||
"bz2",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
const InputPlugin bz2_inputplugin = {
|
||||
|
@@ -118,7 +118,7 @@ iso9660_archive_open(const char *pathname, Error &error)
|
||||
if (iso == nullptr) {
|
||||
error.Format(iso9660_domain,
|
||||
"Failed to open ISO9660 file %s", pathname);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return new Iso9660ArchiveFile(iso);
|
||||
@@ -168,7 +168,7 @@ Iso9660ArchiveFile::OpenStream(const char *pathname,
|
||||
if (statbuf == nullptr) {
|
||||
error.Format(iso9660_domain,
|
||||
"not found in the ISO file: %s", pathname);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Iso9660InputStream *iis =
|
||||
@@ -236,7 +236,7 @@ iso9660_input_eof(struct input_stream *is)
|
||||
|
||||
static const char *const iso9660_archive_extensions[] = {
|
||||
"iso",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
const InputPlugin iso9660_input_plugin = {
|
||||
|
@@ -75,11 +75,11 @@ static constexpr Domain zzip_domain("zzip");
|
||||
static ArchiveFile *
|
||||
zzip_archive_open(const char *pathname, Error &error)
|
||||
{
|
||||
ZZIP_DIR *dir = zzip_dir_open(pathname, NULL);
|
||||
ZZIP_DIR *dir = zzip_dir_open(pathname, nullptr);
|
||||
if (dir == nullptr) {
|
||||
error.Format(zzip_domain, "Failed to open ZIP file %s",
|
||||
pathname);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return new ZzipArchiveFile(dir);
|
||||
@@ -137,7 +137,7 @@ ZzipArchiveFile::OpenStream(const char *pathname,
|
||||
if (_file == nullptr) {
|
||||
error.Format(zzip_domain, "not found in the ZIP file: %s",
|
||||
pathname);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ZzipInputStream *zis =
|
||||
@@ -199,7 +199,7 @@ zzip_input_seek(struct input_stream *is, InputPlugin::offset_type offset,
|
||||
|
||||
static const char *const zzip_archive_extensions[] = {
|
||||
"zip",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
const InputPlugin zzip_input_plugin = {
|
||||
|
Reference in New Issue
Block a user