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

Side by Side Diff: src/ports/SkOSFile_stdio.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, 3 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 unified diff | Download patch
« no previous file with comments | « src/ports/SkOSFile_posix.cpp ('k') | src/ports/SkOSFile_win.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkOSFile.h" 8 #include "SkOSFile.h"
9 #include "SkTypes.h" 9 #include "SkTypes.h"
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 bool sk_frewind(SkFILE* f) { 65 bool sk_frewind(SkFILE* f) {
66 SkASSERT(f); 66 SkASSERT(f);
67 ::rewind((FILE*)f); 67 ::rewind((FILE*)f);
68 return true; 68 return true;
69 } 69 }
70 70
71 size_t sk_fread(void* buffer, size_t byteCount, SkFILE* f) { 71 size_t sk_fread(void* buffer, size_t byteCount, SkFILE* f) {
72 SkASSERT(f); 72 SkASSERT(f);
73 if (buffer == NULL) { 73 if (buffer == nullptr) {
74 size_t curr = ::ftell((FILE*)f); 74 size_t curr = ::ftell((FILE*)f);
75 if ((long)curr == -1) { 75 if ((long)curr == -1) {
76 SkDEBUGF(("sk_fread: ftell(%p) returned -1 feof:%d ferror:%d\n", f, feof((FILE*)f), ferror((FILE*)f))); 76 SkDEBUGF(("sk_fread: ftell(%p) returned -1 feof:%d ferror:%d\n", f, feof((FILE*)f), ferror((FILE*)f)));
77 return 0; 77 return 0;
78 } 78 }
79 int err = ::fseek((FILE*)f, (long)byteCount, SEEK_CUR); 79 int err = ::fseek((FILE*)f, (long)byteCount, SEEK_CUR);
80 if (err != 0) { 80 if (err != 0) {
81 SkDEBUGF(("sk_fread: fseek(%d) tell:%d failed with feof:%d ferror:%d returned:%d\n", 81 SkDEBUGF(("sk_fread: fseek(%d) tell:%d failed with feof:%d ferror:%d returned:%d\n",
82 byteCount, curr, feof((FILE*)f), ferror((FILE*)f), err)) ; 82 byteCount, curr, feof((FILE*)f), ferror((FILE*)f), err)) ;
83 return 0; 83 return 0;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #else 146 #else
147 retval = mkdir(path, 0777); 147 retval = mkdir(path, 0777);
148 #endif 148 #endif
149 if (0 == retval) { 149 if (0 == retval) {
150 return true; 150 return true;
151 } else { 151 } else {
152 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); 152 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path);
153 return false; 153 return false;
154 } 154 }
155 } 155 }
OLDNEW
« no previous file with comments | « src/ports/SkOSFile_posix.cpp ('k') | src/ports/SkOSFile_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698