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:
Rajeev Kumar 2018-02-21 19:08:15 -08:00
parent 56b95d787f
commit 10a75706de
1 changed files with 2 additions and 2 deletions

4
lmkd.c
View File

@ -605,7 +605,7 @@ static int memory_stat_parse(struct memory_stat *mem_st, int pid, uid_t uid) {
fp = fopen(buf, "r");
if (fp == NULL) {
ALOGE("%s open failed: %s", path, strerror(errno));
ALOGE("%s open failed: %s", buf, strerror(errno));
return -1;
}
@ -715,7 +715,7 @@ static int kill_one_process(struct proc* procp, int min_score_adj,
int r;
#ifdef LMKD_LOG_STATS
struct memory_stat mem_st;
struct memory_stat mem_st = {};
int memory_stat_parse_result = -1;
#endif