mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 06:04:49 +00:00
HV:treewide:fix "Attempt to change parameter passed by value"
In the function scope,the parameter should not be changed as Misra required. V1->V2 recover some violations because of ldra's false positive. V2->V3 sync local variable' type to parameter's type with the prefix of const. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -351,11 +351,11 @@ void *memchr(const void *void_s, int c, size_t n)
|
||||
* or else return null.
|
||||
*
|
||||
***********************************************************************/
|
||||
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen)
|
||||
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen_arg)
|
||||
{
|
||||
|
||||
uint8_t *dest8;
|
||||
uint8_t *src8;
|
||||
size_t slen = slen_arg;
|
||||
|
||||
if (slen == 0U || dmax == 0U || dmax < slen) {
|
||||
ASSERT(false);
|
||||
|
Reference in New Issue
Block a user