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

Side by Side Diff: src/ports/SkOSFile_posix.cpp

Issue 18503009: Fix SkTFits in to work properly with signed/unsigned mixtures. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Address comments by adding comments and assertions. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkTemplates.h ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 9
10 #include "SkTemplates.h" 10 #include "SkTFitsIn.h"
11 11
12 #include <stdio.h> 12 #include <stdio.h>
13 #include <sys/mman.h> 13 #include <sys/mman.h>
14 #include <sys/stat.h> 14 #include <sys/stat.h>
15 #include <sys/types.h> 15 #include <sys/types.h>
16 16
17 typedef struct { 17 typedef struct {
18 dev_t dev; 18 dev_t dev;
19 ino_t ino; 19 ino_t ino;
20 } SkFILEID; 20 } SkFILEID;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void* sk_fmmap(SkFILE* f, size_t* size) { 73 void* sk_fmmap(SkFILE* f, size_t* size) {
74 int fd = sk_fileno(f); 74 int fd = sk_fileno(f);
75 if (fd < 0) { 75 if (fd < 0) {
76 return NULL; 76 return NULL;
77 } 77 }
78 78
79 return sk_fdmmap(fd, size); 79 return sk_fdmmap(fd, size);
80 } 80 }
OLDNEW
« no previous file with comments | « include/core/SkTemplates.h ('k') | src/ports/SkOSFile_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698