summaryrefslogtreecommitdiff
path: root/Documentation/input/joydev/joystick-api.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/input/joydev/joystick-api.rst')
-rw-r--r--Documentation/input/joydev/joystick-api.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/input/joydev/joystick-api.rst b/Documentation/input/joydev/joystick-api.rst
index af5934c10c1c..5db6dc6fe1c5 100644
--- a/Documentation/input/joydev/joystick-api.rst
+++ b/Documentation/input/joydev/joystick-api.rst
@@ -263,7 +263,7 @@ possible overrun should the name be too long::
char name[128];
if (ioctl(fd, JSIOCGNAME(sizeof(name)), name) < 0)
- strncpy(name, "Unknown", sizeof(name));
+ strscpy(name, "Unknown", sizeof(name));
printf("Name: %s\n", name);