Skip to content

Commit cf15faa

Browse files
Cacodemon345icculus
authored andcommitted
Change "memset" to "SDL_zero"
1 parent c5f9e06 commit cf15faa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/freebsd/SDL_evdev_kbd_freebsd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static void kbd_cleanup(void)
9393
return;
9494
}
9595
kbd_cleanup_state = NULL;
96+
SDL_zero(mData);
9697
mData.operation = MOUSE_SHOW;
9798
ioctl(kbd->keyboard_fd, KDSKBMODE, kbd->old_kbd_mode);
9899
if (kbd->keyboard_fd != kbd->console_fd) close(kbd->keyboard_fd);
@@ -227,7 +228,7 @@ SDL_EVDEV_kbd_init(void)
227228
char flag_state;
228229
char* devicePath;
229230

230-
memset(&mData, 0, sizeof(struct mouse_info));
231+
SDL_zero(mData);
231232
mData.operation = MOUSE_HIDE;
232233
kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(SDL_EVDEV_keyboard_state));
233234
if (!kbd) {
@@ -303,7 +304,7 @@ SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *kbd)
303304
if (!kbd) {
304305
return;
305306
}
306-
memset(&mData, 0, sizeof(struct mouse_data));
307+
SDL_zero(mData);
307308
mData.operation = MOUSE_SHOW;
308309
ioctl(kbd->console_fd, CONS_MOUSECTL, &mData);
309310

0 commit comments

Comments
 (0)