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

Commit 64c1e890 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use the right printf symbols rather than converting to ints."

parents 9d7e2014 8cb370f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ status_t PrivacyBuffer::stripField(const Privacy* parentPolicy, const PrivacySpe
        // iterator will point to head of next field
        size_t currentAt = mData.rp()->pos();
        writeFieldOrSkip(fieldTag, skip);
        VLOG("[Depth %2d]Field %d %ss %d bytes", depth, fieldId, skip ? "skip" : "write",
             (int)(get_varint_size(fieldTag) + mData.rp()->pos() - currentAt));
        VLOG("[Depth %2d]Field %d %ss %zu bytes", depth, fieldId, skip ? "skip" : "write",
             get_varint_size(fieldTag) + mData.rp()->pos() - currentAt);
        return NO_ERROR;
    }
    // current field is message type and its sub-fields have extra privacy policies
+6 −5
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include "Throttler.h"

#include <inttypes.h>
#include <utils/SystemClock.h>

namespace android {
@@ -42,15 +43,15 @@ bool Throttler::shouldThrottle() {
}

void Throttler::addReportSize(size_t reportByteSize) {
    VLOG("The current request took %d bytes to dropbox", (int)reportByteSize);
    VLOG("The current request took %zu bytes to dropbox", reportByteSize);
    mAccumulatedSize += reportByteSize;
}

void Throttler::dump(FILE* out) {
    fprintf(out, "mSizeLimit=%d\n", (int)mSizeLimit);
    fprintf(out, "mAccumulatedSize=%d\n", (int)mAccumulatedSize);
    fprintf(out, "mRefractoryPeriodMs=%d\n", (int)mRefractoryPeriodMs);
    fprintf(out, "mLastRefractoryMs=%d\n", (int)mLastRefractoryMs);
    fprintf(out, "mSizeLimit=%zu\n", mSizeLimit);
    fprintf(out, "mAccumulatedSize=%zu\n", mAccumulatedSize);
    fprintf(out, "mRefractoryPeriodMs=%" PRIi64 "\n", mRefractoryPeriodMs);
    fprintf(out, "mLastRefractoryMs=%" PRIi64 "\n", mLastRefractoryMs);
}

}  // namespace incidentd
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ TEST_F(ReporterTest, RunReportToGivenDirectory) {

    ASSERT_EQ(Reporter::REPORT_FINISHED, reporter->runReport(&size));
    vector<string> results = InspectFiles();
    ASSERT_EQ((int)results.size(), 1);
    ASSERT_EQ(results.size(), 1UL);
    EXPECT_EQ(results[0],
              "\n\x2"
              "\b\f\n\x6"