Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: services/files/directory_impl.cc

Issue 1459033002: Replace (most) occurrences of mojo::Array<T>() with nullptr. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/files/directory_impl.cc
diff --git a/services/files/directory_impl.cc b/services/files/directory_impl.cc
index 79e523a3ea764cdbf09202b3794120a795275efc..1b17985f9635c88f7a720a3c3df9d71885f17f4d 100644
--- a/services/files/directory_impl.cc
+++ b/services/files/directory_impl.cc
@@ -115,13 +115,13 @@ void DirectoryImpl::Read(const ReadCallback& callback) {
// |closedir()| will close the FD)), so we need to |dup()| ours.
base::ScopedFD fd(dup(dir_fd_.get()));
if (!fd.is_valid()) {
- callback.Run(ErrnoToError(errno), Array<DirectoryEntryPtr>());
+ callback.Run(ErrnoToError(errno), nullptr);
return;
}
ScopedDIR dir(fdopendir(fd.release()));
if (!dir) {
- callback.Run(ErrnoToError(errno), Array<DirectoryEntryPtr>());
+ callback.Run(ErrnoToError(errno), nullptr);
return;
}
@@ -137,7 +137,7 @@ void DirectoryImpl::Read(const ReadCallback& callback) {
struct dirent* entry = nullptr;
if (int error = readdir_r(dir.get(), &buffer, &entry)) {
// |error| is effectively an errno (for |readdir_r()|), AFAICT.
- callback.Run(ErrnoToError(error), Array<DirectoryEntryPtr>());
+ callback.Run(ErrnoToError(error), nullptr);
return;
}

Powered by Google App Engine
This is Rietveld 408576698