[Skiboot] [PATCH 6/8] vpd: Force static analysis to not think about NULL term strings

Stewart Smith stewart at linux.ibm.com
Thu Nov 29 15:28:31 AEDT 2018


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/vpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/vpd.c b/core/vpd.c
index 377c9192cce0..94b7b7aa9961 100644
--- a/core/vpd.c
+++ b/core/vpd.c
@@ -204,7 +204,7 @@ static void *vpd_lid_preload(const uint8_t *lx)
 
 void vpd_iohub_load(struct dt_node *hub_node)
 {
-	char record[4] = "LXR0";
+	uint8_t record[4] = { 'L','X','R','0' }; /* not null terminated */
 	const void *valid_lx;
 	uint8_t lx_size;
 	int r;
-- 
2.19.2



More information about the Skiboot mailing list