From patchwork Mon Jan 14 10:02:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 224 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 25B3F60B31 for ; Mon, 14 Jan 2019 11:03:01 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C9F6505; Mon, 14 Jan 2019 11:03:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547460180; bh=7fx+QWgz67Lf4mCZBCuftEGFyDOlU8K/WIERtuSEx7A=; h=From:To:Cc:Subject:Date:From; b=qp8YF5isvcLnabBJTO6IY/tfv6Z8uPz8IWSPNI6aM6iGimqX9ODgaixO3hojAVgBz 7JifRFA1ibsLeaN7OuaFn1jcVxexPAymqOXI71t9RA4Luvb6aBjYFVeGTQ0T6xQl7Z kgNJWUpqUUnPuGhxirE2KUbb4TvcABfnChK9EScQ= From: Kieran Bingham To: LibCamera Devel Date: Mon, 14 Jan 2019 10:02:56 +0000 Message-Id: <20190114100256.17777-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] libcamera: log: Fix unknown log level representation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 10:03:01 -0000 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") Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp index 281e31d963f5..9b2ae1bac8c8 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"; } /**