diff options
author | Anton Kindestam <antonki@kth.se> | 2019-09-24 21:46:52 +0200 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2019-09-24 21:46:52 +0200 |
commit | bbf6e103b44007165d3116315e62ba2cb43fc391 (patch) | |
tree | c5c00ce0dae43ecb50d1b4269bddb1dc7ff7cb33 /video/out/drm_common.c | |
parent | 68ce36a2db562e3ea9cbc8f23084c5b9c7ed64e5 (diff) | |
download | mpv-bbf6e103b44007165d3116315e62ba2cb43fc391.tar.bz2 mpv-bbf6e103b44007165d3116315e62ba2cb43fc391.tar.xz |
drm_common: add missing zero-initialization of struct vt_mode variable
Some fields were being left uninitialized. This could be a problem
particularly on non-Linux OS:s with vt_mode (see PR #6976).
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r-- | video/out/drm_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 67d8828d3c..fb02130bb0 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -805,7 +805,7 @@ bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log) return false; } - struct vt_mode vt_mode; + struct vt_mode vt_mode = { 0 }; if (ioctl(s->tty_fd, VT_GETMODE, &vt_mode) < 0) { MP_ERR(s, "VT_GETMODE failed: %s\n", mp_strerror(errno)); return false; |