Title: [201792] trunk/Source/WebCore
- Revision
- 201792
- Author
- [email protected]
- Date
- 2016-06-07 22:42:47 -0700 (Tue, 07 Jun 2016)
Log Message
EFL build has been broken since r201761
https://bugs.webkit.org/show_bug.cgi?id=158512
Unreviewed build fix.
* platform/posix/SharedBufferPOSIX.cpp:
(WebCore::SharedBuffer::createFromReadingFile):
Do not use ? operand in return line. Additionally return nullptr instead of 0.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (201791 => 201792)
--- trunk/Source/WebCore/ChangeLog 2016-06-08 05:28:37 UTC (rev 201791)
+++ trunk/Source/WebCore/ChangeLog 2016-06-08 05:42:47 UTC (rev 201792)
@@ -1,3 +1,14 @@
+2016-06-07 Gyuyoung Kim <[email protected]>
+
+ EFL build has been broken since r201761
+ https://bugs.webkit.org/show_bug.cgi?id=158512
+
+ Unreviewed build fix.
+
+ * platform/posix/SharedBufferPOSIX.cpp:
+ (WebCore::SharedBuffer::createFromReadingFile):
+ Do not use ? operand in return line. Additionally return nullptr instead of 0.
+
2016-06-07 Chris Dumez <[email protected]>
Expose Event / EventTarget properties on WorkerGlobalScope
Modified: trunk/Source/WebCore/platform/posix/SharedBufferPOSIX.cpp (201791 => 201792)
--- trunk/Source/WebCore/platform/posix/SharedBufferPOSIX.cpp 2016-06-08 05:28:37 UTC (rev 201791)
+++ trunk/Source/WebCore/platform/posix/SharedBufferPOSIX.cpp 2016-06-08 05:42:47 UTC (rev 201792)
@@ -38,23 +38,23 @@
RefPtr<SharedBuffer> SharedBuffer::createFromReadingFile(const String& filePath)
{
if (filePath.isEmpty())
- return 0;
+ return nullptr;
CString filename = fileSystemRepresentation(filePath);
int fd = open(filename.data(), O_RDONLY);
if (fd == -1)
- return 0;
+ return nullptr;
struct stat fileStat;
if (fstat(fd, &fileStat)) {
close(fd);
- return 0;
+ return nullptr;
}
size_t bytesToRead;
if (!WTF::convertSafely(fileStat.st_size, bytesToRead)) {
close(fd);
- return 0;
+ return nullptr;
}
Vector<char> buffer(bytesToRead);
@@ -66,10 +66,10 @@
close(fd);
- if (totalBytesRead == bytesToRead)
- return SharedBuffer::adoptVector(buffer);
+ if (totalBytesRead != bytesToRead)
+ return nullptr;
- return nullptr;
+ return SharedBuffer::adoptVector(buffer);
}
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes