Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6409546 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Fix bugprone-posix-return warnings

Test: WITH_TIDY=1 make
Bug: 154629561
Change-Id: I27b3ffc430400b4f133890748a2124afdabb7814
parent 10685e62
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -114,11 +114,11 @@ bool MtpFfsHandle::openEndpoints(bool ptp) {
void MtpFfsHandle::advise(int fd) {
    for (unsigned i = 0; i < NUM_IO_BUFS; i++) {
        if (posix_madvise(mIobuf[i].bufs.data(), MAX_FILE_CHUNK_SIZE,
                POSIX_MADV_SEQUENTIAL | POSIX_MADV_WILLNEED) < 0)
                POSIX_MADV_SEQUENTIAL | POSIX_MADV_WILLNEED) != 0)
            PLOG(ERROR) << "Failed to madvise";
    }
    if (posix_fadvise(fd, 0, 0,
                POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE | POSIX_FADV_WILLNEED) < 0)
                POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE | POSIX_FADV_WILLNEED) != 0)
        PLOG(ERROR) << "Failed to fadvise";
}