diff mbox series

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

Message ID 20181129042833.27376-7-stewart@linux.ibm.com
State Accepted
Headers show
Series Random static analysis fixes | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master

Commit Message

Stewart Smith Nov. 29, 2018, 4:28 a.m. UTC
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/vpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;