Changeset 201792 in webkit


Ignore:
Timestamp:
Jun 7, 2016 10:42:47 PM (8 years ago)
Author:
Gyuyoung Kim
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201791 r201792  
     12016-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
    1122016-06-07  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebCore/platform/posix/SharedBufferPOSIX.cpp

    r201790 r201792  
    3939{
    4040    if (filePath.isEmpty())
    41         return 0;
     41        return nullptr;
    4242
    4343    CString filename = fileSystemRepresentation(filePath);
    4444    int fd = open(filename.data(), O_RDONLY);
    4545    if (fd == -1)
    46         return 0;
     46        return nullptr;
    4747
    4848    struct stat fileStat;
    4949    if (fstat(fd, &fileStat)) {
    5050        close(fd);
    51         return 0;
     51        return nullptr;
    5252    }
    5353
     
    5555    if (!WTF::convertSafely(fileStat.st_size, bytesToRead)) {
    5656        close(fd);
    57         return 0;
     57        return nullptr;
    5858    }
    5959
     
    6767    close(fd);
    6868
    69     if (totalBytesRead == bytesToRead)
    70         return SharedBuffer::adoptVector(buffer);
     69    if (totalBytesRead != bytesToRead)
     70        return nullptr;
    7171
    72     return nullptr;
     72    return SharedBuffer::adoptVector(buffer);
    7373}
    7474
Note: See TracChangeset for help on using the changeset viewer.