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

Commit 46760802 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Automerger Merge Worker
Browse files

Merge "Fix bugprone-posix-return warnings" am: 2816b201 am: 5a8fd4c4

Change-Id: I1d83f4fed6d21a2777ed65b681645d694bd673af
parents 65ad5741 5a8fd4c4
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";
}