Fix variable name in log statement and initialize memory_stat before using it.
Bug: 72177881 Test: Tested manually Change-Id: Icbf948dd0e40eaa6c660d55f5cd72182436da086
This commit is contained in:
parent
56b95d787f
commit
10a75706de
4
lmkd.c
4
lmkd.c
|
|
@ -605,7 +605,7 @@ static int memory_stat_parse(struct memory_stat *mem_st, int pid, uid_t uid) {
|
||||||
fp = fopen(buf, "r");
|
fp = fopen(buf, "r");
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
ALOGE("%s open failed: %s", path, strerror(errno));
|
ALOGE("%s open failed: %s", buf, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -715,7 +715,7 @@ static int kill_one_process(struct proc* procp, int min_score_adj,
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
#ifdef LMKD_LOG_STATS
|
#ifdef LMKD_LOG_STATS
|
||||||
struct memory_stat mem_st;
|
struct memory_stat mem_st = {};
|
||||||
int memory_stat_parse_result = -1;
|
int memory_stat_parse_result = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue