mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-29 12:35:48 +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:
@@ -6,12 +6,13 @@
|
||||
|
||||
#include <hypervisor.h>
|
||||
|
||||
static int charout(int cmd, const char *s, int sz, void *hnd)
|
||||
static int charout(int cmd, const char *s, int32_t sz_arg, void *hnd)
|
||||
{
|
||||
/* pointer to an integer to store the number of characters */
|
||||
int *nchars = (int *)hnd;
|
||||
/* working pointer */
|
||||
const char *p = s;
|
||||
int32_t sz = sz_arg;
|
||||
|
||||
/* copy mode ? */
|
||||
if (cmd == PRINT_CMD_COPY) {
|
||||
|
Reference in New Issue
Block a user