From: Youngwan Kim Date: Thu, 12 Jul 2018 02:12:31 +0000 (+0900) Subject: [COMMON] lib: libdss: Convert trash value to 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7dc8c7ac8c7259fd8f963e0344bada3109fb3eef;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] lib: libdss: Convert trash value to 0 Change-Id: I754532fc2f404dca8504fa7c81ad22692e704ae6 Signed-off-by: Youngwan Kim --- diff --git a/lib/libdss.c b/lib/libdss.c index 0ad6104e3f1f..9991c0a798a2 100644 --- a/lib/libdss.c +++ b/lib/libdss.c @@ -97,7 +97,12 @@ int main(int argc, char *argv[]) #endif #ifdef CONFIG_DEBUG_SNAPSHOT_ACPM for (i = 0; i < DSS_LOG_MAX_NUM; i++) { - printf("log.append({'time':%.9f, 'type' : 'acpmlog', 'log' : '%s', 'value' : %d })\n", + for (j = 0; j < 8; j++) { + if (!((p->acpm[i].log[j] >= 'a' && p->acpm[i].log[j] <= 'z') || p->acpm[i].log[j] == '_')) + p->acpm[i].log[j] = 0; + } + printf("log.append({'time':%.9f, 'acpm_time':%.9f, 'type' : 'acpmlog', 'log' : '%s', 'value' : %d })\n", + p->acpm[i].time/1.0e9, p->acpm[i].acpm_time/1.0e9, p->acpm[i].log, p->acpm[i].data);