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

Unified Diff: src/ports/SkOSFile_posix.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 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 | « src/ports/SkMemory_malloc.cpp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkOSFile_posix.cpp
diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp
index b604c2190c548ae4817fa4f4daba64baf71eb885..58662f382f45050380d49c0f611f27ad5f8069d8 100644
--- a/src/ports/SkOSFile_posix.cpp
+++ b/src/ports/SkOSFile_posix.cpp
@@ -63,19 +63,19 @@ void sk_fmunmap(const void* addr, size_t length) {
void* sk_fdmmap(int fd, size_t* size) {
struct stat status;
if (0 != fstat(fd, &status)) {
- return NULL;
+ return nullptr;
}
if (!S_ISREG(status.st_mode)) {
- return NULL;
+ return nullptr;
}
if (!SkTFitsIn<size_t>(status.st_size)) {
- return NULL;
+ return nullptr;
}
size_t fileSize = static_cast<size_t>(status.st_size);
- void* addr = mmap(NULL, fileSize, PROT_READ, MAP_PRIVATE, fd, 0);
+ void* addr = mmap(nullptr, fileSize, PROT_READ, MAP_PRIVATE, fd, 0);
if (MAP_FAILED == addr) {
- return NULL;
+ return nullptr;
}
*size = fileSize;
@@ -89,7 +89,7 @@ int sk_fileno(SkFILE* f) {
void* sk_fmmap(SkFILE* f, size_t* size) {
int fd = sk_fileno(f);
if (fd < 0) {
- return NULL;
+ return nullptr;
}
return sk_fdmmap(fd, size);
@@ -149,7 +149,7 @@ bool SkOSFile::Iter::next(SkString* name, bool getDir) {
if (self.fDIR) {
dirent* entry;
- while ((entry = ::readdir(self.fDIR)) != NULL) {
+ while ((entry = ::readdir(self.fDIR)) != nullptr) {
struct stat s;
SkString str(self.fPath);
« no previous file with comments | « src/ports/SkMemory_malloc.cpp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698