summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-02-01 13:49:19 +0100
committerMax Kellermann <max@musicpd.org>2020-09-07 20:08:27 +0200
commit540919f256c761a3e5ce5cfa3d5c343ef09ed673 (patch)
tree6cd6f0648a4fc50ea7b973ad910c12b3ac476216 /test
parent398281cd76f398b6db1a5f7bc8bed9d11374a465 (diff)
*: use nullptr instead of NULL
Diffstat (limited to 'test')
-rw-r--r--test/DumpDatabase.cxx2
-rw-r--r--test/dump_playlist.cxx6
-rw-r--r--test/dump_rva2.cxx2
-rw-r--r--test/read_mixer.cxx2
-rw-r--r--test/read_tags.cxx4
-rw-r--r--test/run_encoder.cxx2
-rw-r--r--test/run_filter.cxx2
-rw-r--r--test/test_vorbis_encoder.cxx2
8 files changed, 11 insertions, 11 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index 39801baf2..81fa14418 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -112,7 +112,7 @@ try {
const char *const plugin_name = argv[2];
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
- if (plugin == NULL) {
+ if (plugin == nullptr) {
cerr << "No such database plugin: " << plugin_name << endl;
return EXIT_FAILURE;
}
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index ba973703b..a7416bf5d 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -75,7 +75,7 @@ try {
InputStreamPtr is;
auto playlist = playlist_list_open_uri(uri, mutex);
- if (playlist == NULL) {
+ if (playlist == nullptr) {
/* open the stream and wait until it becomes ready */
is = InputStream::OpenReady(uri, mutex);
@@ -83,7 +83,7 @@ try {
/* open the playlist */
playlist = playlist_list_open_stream(std::move(is), uri);
- if (playlist == NULL) {
+ if (playlist == nullptr) {
fprintf(stderr, "Failed to open playlist\n");
return 2;
}
@@ -92,7 +92,7 @@ try {
/* dump the playlist */
std::unique_ptr<DetachedSong> song;
- while ((song = playlist->NextSong()) != NULL) {
+ while ((song = playlist->NextSong()) != nullptr) {
printf("%s\n", song->GetURI());
const unsigned start_ms = song->GetStartTime().ToMS();
diff --git a/test/dump_rva2.cxx b/test/dump_rva2.cxx
index 3f454606d..ebeb9e582 100644
--- a/test/dump_rva2.cxx
+++ b/test/dump_rva2.cxx
@@ -70,7 +70,7 @@ try {
auto is = OpenLocalInputStream(path, mutex);
const auto tag = tag_id3_load(*is);
- if (tag == NULL) {
+ if (tag == nullptr) {
fprintf(stderr, "No ID3 tag found\n");
return EXIT_FAILURE;
}
diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx
index ad50b8bb4..008ab29e6 100644
--- a/test/read_mixer.cxx
+++ b/test/read_mixer.cxx
@@ -36,7 +36,7 @@ const FilterPlugin *
filter_plugin_by_name(gcc_unused const char *name) noexcept
{
assert(false);
- return NULL;
+ return nullptr;
}
int main(int argc, gcc_unused char **argv)
diff --git a/test/read_tags.cxx b/test/read_tags.cxx
index 7c392dc2b..aafc58a3b 100644
--- a/test/read_tags.cxx
+++ b/test/read_tags.cxx
@@ -100,7 +100,7 @@ try {
const ScopeDecoderPluginsInit decoder_plugins_init({});
plugin = decoder_plugin_from_name(decoder_name);
- if (plugin == NULL) {
+ if (plugin == nullptr) {
fprintf(stderr, "No such decoder: %s\n", decoder_name);
return EXIT_FAILURE;
}
@@ -117,7 +117,7 @@ try {
Mutex mutex;
InputStreamPtr is;
- if (!success && plugin->scan_stream != NULL) {
+ if (!success && plugin->scan_stream != nullptr) {
is = InputStream::OpenReady(path, mutex);
success = plugin->ScanStream(*is, h);
}
diff --git a/test/run_encoder.cxx b/test/run_encoder.cxx
index 9096d9e5b..97f9d90b5 100644
--- a/test/run_encoder.cxx
+++ b/test/run_encoder.cxx
@@ -55,7 +55,7 @@ try {
/* create the encoder */
const auto plugin = encoder_plugin_get(encoder_name);
- if (plugin == NULL) {
+ if (plugin == nullptr) {
fprintf(stderr, "No such encoder: %s\n", encoder_name);
return EXIT_FAILURE;
}
diff --git a/test/run_filter.cxx b/test/run_filter.cxx
index 40dce22c2..5113a7250 100644
--- a/test/run_filter.cxx
+++ b/test/run_filter.cxx
@@ -53,7 +53,7 @@ LoadFilter(const ConfigData &config, const char *name)
{
const auto *param = config.FindBlock(ConfigBlockOption::AUDIO_FILTER,
"name", name);
- if (param == NULL)
+ if (param == nullptr)
throw FormatRuntimeError("No such configured filter: %s",
name);
diff --git a/test/test_vorbis_encoder.cxx b/test/test_vorbis_encoder.cxx
index 2524d4564..26c8a8784 100644
--- a/test/test_vorbis_encoder.cxx
+++ b/test/test_vorbis_encoder.cxx
@@ -41,7 +41,7 @@ try {
/* create the encoder */
const auto plugin = encoder_plugin_get("vorbis");
- assert(plugin != NULL);
+ assert(plugin != nullptr);
ConfigBlock block;
block.AddBlockParam("quality", "5.0", -1);