mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
gpiolib: replace snprintf("%s") with strscpy
Replace snprintf("%s", ...) with strscpy() for direct string copying.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260222170327.281576-2-thorsten.blum@linux.dev
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
0acbe817c3
commit
e8fc8588d0
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
|
|
@ -107,7 +108,7 @@ extern const char *const gpio_suffixes[];
|
|||
if (con_id) \
|
||||
snprintf(propname, sizeof(propname), "%s-%s", con_id, __gs); \
|
||||
else \
|
||||
snprintf(propname, sizeof(propname), "%s", __gs); \
|
||||
strscpy(propname, __gs); \
|
||||
1; \
|
||||
}); \
|
||||
__suffixes++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user