diff options
author | B. Watson <urchlay@slackware.uk> | 2025-05-09 16:40:43 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-05-09 16:40:43 -0400 |
commit | 915c8c83f8df05c3ccaa1739a844f2e2782185d3 (patch) | |
tree | 885657365c4914e65d6f6802146c5ac9d3817aff | |
parent | 93f32dfcdf6eee2170e3ba8cdbf15b8a88affa8b (diff) | |
download | marsond-915c8c83f8df05c3ccaa1739a844f2e2782185d3.tar.gz |
use UINPUT_MAX_NAME_SIZE.
-rw-r--r-- | marsond.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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?)"); |