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:
Huihuang Shi
2018-07-25 11:19:52 +08:00
committed by lijinxia
parent e71a0887a0
commit 5189bcd272
26 changed files with 96 additions and 59 deletions

View File

@@ -682,10 +682,11 @@ static int charmem(int cmd, const char *s, int sz, void *hnd)
return n;
}
int vsnprintf(char *dst, int sz, const char *fmt, va_list args)
int vsnprintf(char *dst, int32_t sz_arg, const char *fmt, va_list args)
{
char c[1];
/* the result of this function */
int32_t sz = sz_arg;
int res = 0;
if (sz <= 0 || (dst == NULL)) {