diff options
author | Derek Morton <derek.j.morton@intel.com> | 2015-12-23 15:34:48 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-01-06 15:17:53 +0100 |
commit | 8528b484e8cf9d8e9c627f99e283285726967f74 (patch) | |
tree | d9eba43f42642cda58664fa9b376a8f106bcb022 /lib/igt_core.c | |
parent | 51bb53663e2d0c57e9e40c1961d67ddc1e086be5 (diff) |
igt_core: Fix logging to display extended line
line[strlen(line)] will always evaluate to NULL so line_continuation
was always true. That prevented the program name, pid and log level
ever being printed.
Changed to [strlen(line) - 1] so the last character before the null
terminator is compared with '\n' to determine line_continuation.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 554f2f0e..6b69bb78 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1748,7 +1748,7 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format, goto out; } - line_continuation = line[strlen(line)] != '\n'; + line_continuation = line[strlen(line) - 1] != '\n'; /* append log buffer */ _igt_log_buffer_append(formatted_line); |