From 7e157ef8794a67be8bd818a1eb41cd65eea5190c Mon Sep 17 00:00:00 2001 From: Kichan Kwon Date: Thu, 14 Apr 2016 10:28:28 +0900 Subject: [PATCH] proc-stat : change log priority - If resourced can't find pkgname in the program list, add new one - Therefore, we don't have to worry about that if making new list is successful Change-Id: I2360186e07fd408ae0cfbd4b12ebc465cc8b7353 Signed-off-by: Kichan Kwon --- src/proc-stat/proc-main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/proc-stat/proc-main.c b/src/proc-stat/proc-main.c index 219bb7e..077a2ef 100644 --- a/src/proc-stat/proc-main.c +++ b/src/proc-stat/proc-main.c @@ -232,17 +232,19 @@ struct proc_program_info *proc_add_program_list(const int type, ppi = find_program_info(pkgname); if (!ppi) { - _E("not found ppi : %s", pkgname); + _D("Can't find %s in the program list. Start to add it", pkgname); ppi = calloc(sizeof(struct proc_program_info), 1); - if (!ppi) + if (!ppi) { + _E("Fail to add %s : not enough memory", pkgname); return NULL; + } if (pai->ai) ppi->pkgname = pai->ai->pkgname; else { ppi->pkgname = strndup(pkgname, strlen(pkgname)+1); if (!ppi->pkgname) { - _E("not enough memory"); + _E("Fail to add %s : not enough memory", pkgname); free(ppi); return NULL; } -- 2.7.4