mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
tools: acrn-crashlog: refine the configuration structure
1. get string size when parsing configuration. 2. add 'const' for strings got from configuration. Tracked-On: #1254 Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
@@ -72,7 +72,7 @@ static char *next_vm_event(const char *cursor, const char *data,
|
||||
size_t dlen, const struct vm_t *vm)
|
||||
{
|
||||
char *line_to_sync = (char *)~(0);
|
||||
char *syncevent;
|
||||
const char *syncevent;
|
||||
int id;
|
||||
|
||||
if (!cursor || !vm)
|
||||
@@ -408,7 +408,7 @@ static void sync_lines_stage2(const struct sender_t *sender,
|
||||
continue;
|
||||
}
|
||||
|
||||
vm = get_vm_by_name(vm_name);
|
||||
vm = get_vm_by_name((const char *)vm_name);
|
||||
if (!vm || !vm->history_data)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user