From bced32d514bb36b97f4dd045f4ee6919e1642aa0 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 11 Jan 2019 15:13:42 +0000 Subject: libcamera: log: Fix unknown log level representation Commit 99a3e7bcfb38 ("libcamera: log: Add a LogFatal log level") expanded the text representation of the log levels to support the FATAL string, but left the default unknown match at four characters. This code should never expect to be executed, but for completeness match the string lengths by adding an extra character to the result. Fixes: 99a3e7bcfb38 ("libcamera: log: Add a LogFatal log level") Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- src/libcamera/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcamera/log.cpp') diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp index 281e31d9..9b2ae1ba 100644 --- a/src/libcamera/log.cpp +++ b/src/libcamera/log.cpp @@ -77,7 +77,7 @@ static const char *log_severity_name(LogSeverity severity) if (static_cast(severity) < ARRAY_SIZE(names)) return names[severity]; else - return "UNKN"; + return "UNKWN"; } /** -- cgit v1.2.1