Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btintel_pcie: Replace snprintf("%s") with strscpy

Replace snprintf("%s", ...) with the faster and more direct strscpy().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Thorsten Blum and committed by
Luiz Augusto von Dentz
c0ad33d2 9ff5ff0b

+2 -1
+2 -1
drivers/bluetooth/btintel_pcie.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/firmware.h> 12 12 #include <linux/pci.h> 13 + #include <linux/string.h> 13 14 #include <linux/wait.h> 14 15 #include <linux/delay.h> 15 16 #include <linux/interrupt.h> ··· 269 268 if (!skb) 270 269 return; 271 270 272 - snprintf(buf, sizeof(buf), "%s", "---- Dump of debug registers ---"); 271 + strscpy(buf, "---- Dump of debug registers ---"); 273 272 bt_dev_dbg(hdev, "%s", buf); 274 273 skb_put_data(skb, buf, strlen(buf)); 275 274