openbsd-ports/audio/libworkman/patches/patch-scsi_c
jca d84f4876bc Fix build with clang 15
Refresh patches while here
2023-01-24 18:12:41 +00:00

17 lines
716 B
Plaintext

Index: scsi.c
--- scsi.c.orig
+++ scsi.c
@@ -202,9 +202,9 @@ wm_scsi_get_drive_type( struct wm_drive *d, char *vend
wm_lib_message(WM_MSG_LEVEL_INFO|WM_MSG_CLASS, "Sending SCSI inquiry command...");
if (sendscsi(d, buf, sizeof(buf), 1, SCMD_INQUIRY, 0, 0, 0, sizeof(buf), 0,0,0,0,0,0,0))
{
- sprintf( vendor, WM_STR_GENVENDOR);
- sprintf( model, WM_STR_GENMODEL);
- sprintf( rev, WM_STR_GENREV);
+ strlcpy( vendor, WM_STR_GENVENDOR, sizeof(vendor));
+ strlcpy( model, WM_STR_GENMODEL, sizeof(model));
+ strlcpy( rev, WM_STR_GENREV, sizeof(rev));
wm_lib_message(WM_MSG_LEVEL_ERROR|WM_MSG_CLASS, "\nSCSI inquiry command not supported by the hardware\n");
return (WM_ERR_SCSI_INQUIRY_FAILED);
}