log: correct log behavior 31/171131/2
authorBoram Park <boram1288.park@samsung.com>
Tue, 27 Feb 2018 01:17:31 +0000 (10:17 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 27 Feb 2018 03:38:07 +0000 (12:38 +0900)
Change-Id: Ic1a1c9560e5e79a1b159a1faa8d1bb1819aa7839

common/tdm_log.c

index e2d0277..c41e869 100644 (file)
@@ -81,8 +81,8 @@ EXTERN void
 tdm_log_enable_dlog(unsigned int enable)
 {
        const char *debug = getenv("TDM_DLOG");
-       if (debug && strstr(debug, "1"))
-               enable = 1;
+       if (debug)
+               enable = (debug[0] == '1') ? 1 : 0;
 
        dlog_enable = enable;
 }