aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkOSFile_stdio.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-28 10:34:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-28 17:48:57 +0000
commita93a14a99816d25b773f0b12868143702baf44bf (patch)
tree727e7cb88867bdc12cbcf8baa354ae3afc9444e2 /src/ports/SkOSFile_stdio.cpp
parent695db408437807d049ecc02b3b852704092728f2 (diff)
Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkOSFile_stdio.cpp')
-rw-r--r--src/ports/SkOSFile_stdio.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp
index 68c2d3d4d7..77f502a96e 100644
--- a/src/ports/SkOSFile_stdio.cpp
+++ b/src/ports/SkOSFile_stdio.cpp
@@ -29,8 +29,8 @@ static FILE* ios_open_from_bundle(const char path[], const char* perm) {
CFBundleRef mainBundle = CFBundleGetMainBundle();
// Get a reference to the file's URL
- CFStringRef pathRef = CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8);
- CFURLRef imageURL = CFBundleCopyResourceURL(mainBundle, pathRef, NULL, NULL);
+ CFStringRef pathRef = CFStringCreateWithCString(nullptr, path, kCFStringEncodingUTF8);
+ CFURLRef imageURL = CFBundleCopyResourceURL(mainBundle, pathRef, nullptr, nullptr);
CFRelease(pathRef);
if (!imageURL) {
return nullptr;
@@ -81,7 +81,7 @@ FILE* sk_fopen(const char path[], SkFILE_Flags flags) {
}
#endif
if (nullptr == file && (flags & kWrite_SkFILE_Flag)) {
- SkDEBUGF(("sk_fopen: fopen(\"%s\", \"%s\") returned NULL (errno:%d): %s\n",
+ SkDEBUGF(("sk_fopen: fopen(\"%s\", \"%s\") returned nullptr (errno:%d): %s\n",
path, perm, errno, strerror(errno)));
}
return file;