aboutsummaryrefslogtreecommitdiff
path: root/marsond.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-05-09 16:40:43 -0400
committerB. Watson <urchlay@slackware.uk>2025-05-09 16:40:43 -0400
commit915c8c83f8df05c3ccaa1739a844f2e2782185d3 (patch)
tree885657365c4914e65d6f6802146c5ac9d3817aff /marsond.c
parent93f32dfcdf6eee2170e3ba8cdbf15b8a88affa8b (diff)
downloadmarsond-915c8c83f8df05c3ccaa1739a844f2e2782185d3.tar.gz
use UINPUT_MAX_NAME_SIZE.
Diffstat (limited to 'marsond.c')
-rw-r--r--marsond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/marsond.c b/marsond.c
index b1b5368..87ddf14 100644
--- a/marsond.c
+++ b/marsond.c
@@ -339,8 +339,8 @@ int main(int argc, char **argv) {
device number, but it's just 0 for no error. */
if(ioctl(outfd, UI_DEV_CREATE) >= 0) {
if(debugging) {
- char name[64];
- if(ioctl(outfd, UI_GET_SYSNAME(sizeof(name)), name) >= 0) {
+ char name[UINPUT_MAX_NAME_SIZE];
+ if(ioctl(outfd, UI_GET_SYSNAME(UINPUT_MAX_NAME_SIZE), name) >= 0) {
debug("created virtual keyboard device: /sys/devices/virtual/input/%s/", name);
} else {
debug("created virtual keyboard device but couldn't get its name (old kernel?)");