vt: use proper return value check with TUNABLE_INT_FETCH

The TUNABLE_INT_FETCH is macro around getenv_int() and we will get
return value 0 or 1 for failure or success, we can use it to decide
which background color to use.
This commit is contained in:
tsoome 2019-09-26 07:14:54 +00:00
parent ed7bf2816a
commit d082bb768d

View File

@ -480,8 +480,7 @@ vt_fb_init(struct vt_device *vd)
}
c = TC_BLACK;
TUNABLE_INT_FETCH("teken.bg_color", &bg);
if (bg != -1) {
if (TUNABLE_INT_FETCH("teken.bg_color", &bg) != 0) {
if (bg == TC_WHITE)
bg |= TC_LIGHT;
c = bg;