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

Unified Diff: content/common/font_config_ipc_linux.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 months 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
« no previous file with comments | « content/common/font_cache_dispatcher_win.cc ('k') | content/common/font_list_pango.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/font_config_ipc_linux.cc
diff --git a/content/common/font_config_ipc_linux.cc b/content/common/font_config_ipc_linux.cc
index fcb06ebac0def482978e79011532e8b59804bebd..3985e6d1cf09d20eac3557acdb4ad359fd85cc2b 100644
--- a/content/common/font_config_ipc_linux.cc
+++ b/content/common/font_config_ipc_linux.cc
@@ -23,11 +23,11 @@
namespace content {
-// Return a stream from the file descriptor, or NULL on failure.
+// Return a stream from the file descriptor, or nullptr on failure.
SkStream* StreamFromFD(int fd) {
skia::RefPtr<SkData> data = skia::AdoptRef(SkData::NewFromFD(fd));
if (!data) {
- return NULL;
+ return nullptr;
}
return new SkMemoryStream(data.get());
}
@@ -62,7 +62,7 @@ bool FontConfigIPC::matchFamilyName(const char familyName[],
uint8_t reply_buf[2048];
const ssize_t r = UnixDomainSocket::SendRecvMsg(fd_, reply_buf,
- sizeof(reply_buf), NULL,
+ sizeof(reply_buf), nullptr,
request);
if (r == -1)
return false;
@@ -107,7 +107,7 @@ SkStream* FontConfigIPC::openStream(const FontIdentity& identity) {
&result_fd, request);
if (r == -1)
- return NULL;
+ return nullptr;
Pickle reply(reinterpret_cast<char*>(reply_buf), r);
bool result;
@@ -116,7 +116,7 @@ SkStream* FontConfigIPC::openStream(const FontIdentity& identity) {
!result) {
if (result_fd)
CloseFD(result_fd);
- return NULL;
+ return nullptr;
}
SkStream* stream = StreamFromFD(result_fd);
« no previous file with comments | « content/common/font_cache_dispatcher_win.cc ('k') | content/common/font_list_pango.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698