Changeset 201792 in webkit
- Timestamp:
- Jun 7, 2016 10:42:47 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r201791 r201792 1 2016-06-07 Gyuyoung Kim <gyuyoung.kim@webkit.org> 2 3 EFL build has been broken since r201761 4 https://bugs.webkit.org/show_bug.cgi?id=158512 5 6 Unreviewed build fix. 7 8 * platform/posix/SharedBufferPOSIX.cpp: 9 (WebCore::SharedBuffer::createFromReadingFile): 10 Do not use ? operand in return line. Additionally return nullptr instead of 0. 11 1 12 2016-06-07 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/platform/posix/SharedBufferPOSIX.cpp
r201790 r201792 39 39 { 40 40 if (filePath.isEmpty()) 41 return 0;41 return nullptr; 42 42 43 43 CString filename = fileSystemRepresentation(filePath); 44 44 int fd = open(filename.data(), O_RDONLY); 45 45 if (fd == -1) 46 return 0;46 return nullptr; 47 47 48 48 struct stat fileStat; 49 49 if (fstat(fd, &fileStat)) { 50 50 close(fd); 51 return 0;51 return nullptr; 52 52 } 53 53 … … 55 55 if (!WTF::convertSafely(fileStat.st_size, bytesToRead)) { 56 56 close(fd); 57 return 0;57 return nullptr; 58 58 } 59 59 … … 67 67 close(fd); 68 68 69 if (totalBytesRead == bytesToRead)70 return SharedBuffer::adoptVector(buffer);69 if (totalBytesRead != bytesToRead) 70 return nullptr; 71 71 72 return nullptr;72 return SharedBuffer::adoptVector(buffer); 73 73 } 74 74
Note: See TracChangeset
for help on using the changeset viewer.