diff options
author | halcanary <halcanary@google.com> | 2015-11-20 13:47:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-20 13:47:49 -0800 |
commit | d76be9c79baa1530d3dc95c58022e83607a1bb2a (patch) | |
tree | ebab3adf39a9eee73f1284517eba04d1ca82fa47 /src/ports/SkOSFile_posix.cpp | |
parent | 90ba095c459e38581353073826785074b5953b8c (diff) |
Eliminate SkFILE: it always is the same as FILE.
Review URL: https://codereview.chromium.org/1467533003
Diffstat (limited to 'src/ports/SkOSFile_posix.cpp')
-rw-r--r-- | src/ports/SkOSFile_posix.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp index 58662f382f..396de68bbe 100644 --- a/src/ports/SkOSFile_posix.cpp +++ b/src/ports/SkOSFile_posix.cpp @@ -35,8 +35,8 @@ typedef struct { ino_t ino; } SkFILEID; -static bool sk_ino(SkFILE* a, SkFILEID* id) { - int fd = fileno((FILE*)a); +static bool sk_ino(FILE* a, SkFILEID* id) { + int fd = fileno(a); if (fd < 0) { return 0; } @@ -49,7 +49,7 @@ static bool sk_ino(SkFILE* a, SkFILEID* id) { return true; } -bool sk_fidentical(SkFILE* a, SkFILE* b) { +bool sk_fidentical(FILE* a, FILE* b) { SkFILEID aID, bID; return sk_ino(a, &aID) && sk_ino(b, &bID) && aID.ino == bID.ino @@ -82,11 +82,11 @@ void* sk_fdmmap(int fd, size_t* size) { return addr; } -int sk_fileno(SkFILE* f) { - return fileno((FILE*)f); +int sk_fileno(FILE* f) { + return fileno(f); } -void* sk_fmmap(SkFILE* f, size_t* size) { +void* sk_fmmap(FILE* f, size_t* size) { int fd = sk_fileno(f); if (fd < 0) { return nullptr; |