evdev: remove duplicate sizeof

This looks like a copy-and-paste error. In practice it was harmless on
64-bit systems because evdev_event happens to be 64 bits long, but on
32-bit systems it would allocate too little memory.

Found by GCC 15 with _FORTIFY_SOURCE=3 on ia32.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1288>
This commit is contained in:
Adam Sampson 2025-08-01 14:50:36 +01:00 committed by Marge Bot
parent 931dad76a9
commit 47d4c563f4

View file

@ -509,7 +509,7 @@ static inline struct evdev_frame *
evdev_frame_new(size_t max_size)
{
struct evdev_frame *frame =
zalloc(max_size * sizeof(sizeof(*frame->events)) + sizeof(*frame));
zalloc(max_size * sizeof(*frame->events) + sizeof(*frame));
frame->refcount = 1;
frame->max_size = max_size;