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

Commit fcf5248b authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Use String8/16 c_str [mtp]

Bug: 295394788
Test: make checkbuild
Change-Id: If578a11f6b6805e1ae9364437d09b3d854fef0df
parent de76fc18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ void MtpDataPacketFuzzer::process() {
                    if (mFdp.ConsumeBool()) {
                        std::string str = mFdp.ConsumeRandomLengthString(kMaxLength);
                        android::String16 s(str.c_str());
                        char16_t* data = const_cast<char16_t*>(s.string());
                        char16_t* data = const_cast<char16_t*>(s.c_str());
                        mtpDataPacket.putString(reinterpret_cast<uint16_t*>(data));
                    } else {
                        mtpDataPacket.putString(static_cast<uint16_t*>(nullptr));
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void MtpPropertyFuzzer::process() {
                    std::string str = mFdp.ConsumeRandomLengthString(kMaxLength);
                    android::String16 s(str.c_str());
                    if (mFdp.ConsumeBool()) {
                        data = const_cast<char16_t*>(s.string());
                        data = const_cast<char16_t*>(s.c_str());
                    }

                    if (mFdp.ConsumeBool()) {