aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/examples/ev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/hw/dmx/examples/ev.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/hw/dmx/examples/ev.c')
-rw-r--r--xorg-server/hw/dmx/examples/ev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/hw/dmx/examples/ev.c b/xorg-server/hw/dmx/examples/ev.c
index ba45c2b25..ed23b8aa9 100644
--- a/xorg-server/hw/dmx/examples/ev.c
+++ b/xorg-server/hw/dmx/examples/ev.c
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
#define test_bit(bit) (mask[(bit)/8] & (1 << ((bit)%8)))
for (i = 0; i < 32; i++) {
- sprintf(name, "/dev/input/event%d", i);
+ snprintf(name, sizeof(name), "/dev/input/event%d", i);
if ((fd = open(name, O_RDONLY, 0)) >= 0) {
ioctl(fd, EVIOCGVERSION, &version);
ioctl(fd, EVIOCGNAME(sizeof(buf)), buf);
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
}
if (argc > 1) {
- sprintf(name, "/dev/input/event%d", atoi(argv[1]));
+ snprintf(name, sizeof(name), "/dev/input/event%d", atoi(argv[1]));
if ((fd = open(name, O_RDWR, 0)) >= 0) {
printf("%s: open, fd = %d\n", name, fd);
for (i = 0; i < LED_MAX; i++) {