From 70ef8db5d6f5a640093a06d733c82fd56c6df429 Mon Sep 17 00:00:00 2001 From: Olaf Meeuwissen Date: Mon, 23 Dec 2019 21:36:13 +0900 Subject: [PATCH] hp: Fix [-Wstringop-truncation] compiler warning --- backend/hp-scl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/hp-scl.c b/backend/hp-scl.c index a7376e637..fae7f9762 100644 --- a/backend/hp-scl.c +++ b/backend/hp-scl.c @@ -523,8 +523,8 @@ sanei_hp_nonscsi_new (HpScsi * newp, const char * devname, HpConnect connect) } /* For SCSI-devices we would have the inquire command here */ - strncpy ((char *)new->inq_data, "\003zzzzzzzHP ------ R000", - sizeof (new->inq_data)); + memcpy (new->inq_data, "\003zzzzzzzHP ------ R000", + sizeof (new->inq_data)); new->bufp = new->buf + HP_SCSI_CMD_LEN; new->devname = sanei_hp_alloc ( strlen ( devname ) + 1 );