libcamera: log: Fix unknown log level representation

Commit 99a3e7bcfb ("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: 99a3e7bcfb ("libcamera: log: Add a LogFatal log level")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2019-01-11 15:13:42 +00:00
parent d833c1d39e
commit bced32d514

View file

@ -77,7 +77,7 @@ static const char *log_severity_name(LogSeverity severity)
if (static_cast<unsigned int>(severity) < ARRAY_SIZE(names))
return names[severity];
else
return "UNKN";
return "UNKWN";
}
/**