aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateArchive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 18:19:03 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 18:19:03 +0200
commit59f8144c50765189594d5932fc25869f9ea6e265 (patch)
treef460d9f46a99040dea402bcb3ad2d84a0e734285 /src/UpdateArchive.cxx
parent5a7c931293b55a27c3f79c6951707a8d6e2a5f6c (diff)
downloadmpd-59f8144c50765189594d5932fc25869f9ea6e265.tar.gz
mpd-59f8144c50765189594d5932fc25869f9ea6e265.tar.xz
mpd-59f8144c50765189594d5932fc25869f9ea6e265.zip
*: use nullptr instead of NULL
Diffstat (limited to 'src/UpdateArchive.cxx')
-rw-r--r--src/UpdateArchive.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/UpdateArchive.cxx b/src/UpdateArchive.cxx
index 730dfe883..f3f4cd65e 100644
--- a/src/UpdateArchive.cxx
+++ b/src/UpdateArchive.cxx
@@ -63,9 +63,9 @@ update_archive_tree(Directory *directory, const char *name)
db_lock();
Song *song = directory->FindSong(name);
db_unlock();
- if (song == NULL) {
+ if (song == nullptr) {
song = Song::LoadFile(name, directory);
- if (song != NULL) {
+ if (song != nullptr) {
db_lock();
directory->AddSong(song);
db_unlock();
@@ -95,7 +95,7 @@ update_archive_file2(Directory *parent, const char *name,
Directory *directory = parent->FindChild(name);
db_unlock();
- if (directory != NULL && directory->mtime == st->st_mtime &&
+ if (directory != nullptr && directory->mtime == st->st_mtime &&
!walk_discard)
/* MPD has already scanned the archive, and it hasn't
changed since - don't consider updating it */
@@ -106,14 +106,14 @@ update_archive_file2(Directory *parent, const char *name,
/* open archive */
Error error;
ArchiveFile *file = archive_file_open(plugin, path_fs.c_str(), error);
- if (file == NULL) {
+ if (file == nullptr) {
LogError(error);
return;
}
FormatDebug(update_domain, "archive %s opened", path_fs.c_str());
- if (directory == NULL) {
+ if (directory == nullptr) {
FormatDebug(update_domain,
"creating archive directory: %s", name);
db_lock();
@@ -153,7 +153,7 @@ update_archive_file(Directory *directory,
#ifdef ENABLE_ARCHIVE
const struct archive_plugin *plugin =
archive_plugin_from_suffix(suffix);
- if (plugin == NULL)
+ if (plugin == nullptr)
return false;
update_archive_file2(directory, name, st, plugin);