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:
@@ -84,7 +84,7 @@ static int crash_has_mightcontents(const struct crash_t *crash,
|
||||
int ret = 1;
|
||||
int ret_exp;
|
||||
int expid, cntid;
|
||||
char * const *exp;
|
||||
const char * const *exp;
|
||||
const char *content;
|
||||
|
||||
for_each_expression_crash(expid, exp, crash) {
|
||||
@@ -128,7 +128,7 @@ static int crash_match_content(const struct crash_t *crash, const char *file)
|
||||
static int _get_data(const char *file, const struct crash_t *crash,
|
||||
char **data, const int index)
|
||||
{
|
||||
char *search_key;
|
||||
const char *search_key;
|
||||
char *value;
|
||||
char *end;
|
||||
int size;
|
||||
|
||||
Reference in New Issue
Block a user