Module Name:    src
Committed By:   martin
Date:           Sat May  4 12:04:56 UTC 2024

Modified Files:
        src/sys/dev/raidframe [netbsd-10]: rf_disks.c

Log Message:
Additionally pull up to fix the llvm build after #674:

        sys/dev/raidframe/rf_disks.c    1.95

snprintf() should really include a format.


To generate a diff of this commit:
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/sys/dev/raidframe/rf_disks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_disks.c
diff -u src/sys/dev/raidframe/rf_disks.c:1.93.4.1 src/sys/dev/raidframe/rf_disks.c:1.93.4.2
--- src/sys/dev/raidframe/rf_disks.c:1.93.4.1	Sun Apr 28 12:09:08 2024
+++ src/sys/dev/raidframe/rf_disks.c	Sat May  4 12:04:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_disks.c,v 1.93.4.1 2024/04/28 12:09:08 martin Exp $	*/
+/*	$NetBSD: rf_disks.c,v 1.93.4.2 2024/05/04 12:04:56 martin Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@
  ***************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.93.4.1 2024/04/28 12:09:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.93.4.2 2024/05/04 12:04:56 martin Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -1269,9 +1269,9 @@ rf_swap_components(RF_Raid_t *raidPtr, i
 	RF_ASSERT(raidPtr->accesses_suspended == 0);
 	
 	/* Swap the component names... */
-	snprintf(tmpdevname, sizeof(tmpdevname),raidPtr->Disks[a].devname);
-	snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), raidPtr->Disks[b].devname);
-	snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), tmpdevname);
+	snprintf(tmpdevname, sizeof(tmpdevname), "%s", raidPtr->Disks[a].devname);
+	snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), "%s", raidPtr->Disks[b].devname);
+	snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), "%s", tmpdevname);
 
 	/* and the vp */
 	tmp_ci_vp = raidPtr->raid_cinfo[a].ci_vp;

Reply via email to