From c0270d7b3986f0489f408ba218b79dfff56e3fff Mon Sep 17 00:00:00 2001 From: wangkai Date: Sun, 25 Sep 2022 16:28:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?blob=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangkai --- services/ans/test/unittest/mock/blob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/ans/test/unittest/mock/blob.cpp b/services/ans/test/unittest/mock/blob.cpp index 540888d0f..31b20ed2d 100644 --- a/services/ans/test/unittest/mock/blob.cpp +++ b/services/ans/test/unittest/mock/blob.cpp @@ -172,7 +172,7 @@ Blob *Blob::Unmarshalling(Parcel &parcel) } /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ -bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const +bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int bufferLeftSize) const { if (cursorPtr == nullptr || bufferLeftSize < static_cast(blob_.size() + sizeof(int))) { return false; -- Gitee From 3a21bdc275321dc7c92c17314f545f6192f4b5c4 Mon Sep 17 00:00:00 2001 From: wangkai Date: Sun, 25 Sep 2022 17:16:42 +0800 Subject: [PATCH 2/2] change Signed-off-by: wangkai --- frameworks/test/moduletest/mock/blob.cpp | 2 +- services/test/moduletest/mock/blob.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/test/moduletest/mock/blob.cpp b/frameworks/test/moduletest/mock/blob.cpp index 540888d0f..31b20ed2d 100644 --- a/frameworks/test/moduletest/mock/blob.cpp +++ b/frameworks/test/moduletest/mock/blob.cpp @@ -172,7 +172,7 @@ Blob *Blob::Unmarshalling(Parcel &parcel) } /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ -bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const +bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int bufferLeftSize) const { if (cursorPtr == nullptr || bufferLeftSize < static_cast(blob_.size() + sizeof(int))) { return false; diff --git a/services/test/moduletest/mock/blob.cpp b/services/test/moduletest/mock/blob.cpp index 540888d0f..31b20ed2d 100644 --- a/services/test/moduletest/mock/blob.cpp +++ b/services/test/moduletest/mock/blob.cpp @@ -172,7 +172,7 @@ Blob *Blob::Unmarshalling(Parcel &parcel) } /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ -bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const +bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int bufferLeftSize) const { if (cursorPtr == nullptr || bufferLeftSize < static_cast(blob_.size() + sizeof(int))) { return false; -- Gitee