summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2019-09-24 21:46:52 +0200
committerAnton Kindestam <antonki@kth.se>2019-09-24 21:46:52 +0200
commitbbf6e103b44007165d3116315e62ba2cb43fc391 (patch)
treec5c00ce0dae43ecb50d1b4269bddb1dc7ff7cb33
parent68ce36a2db562e3ea9cbc8f23084c5b9c7ed64e5 (diff)
downloadmpv-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).
-rw-r--r--video/out/drm_common.c2
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;