Date: Thu, 26 Sep 2019 07:14:54 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352739 - head/sys/dev/vt/hw/fb Message-ID: <201909260714.x8Q7EsMM058012@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Thu Sep 26 07:14:54 2019 New Revision: 352739 URL: https://svnweb.freebsd.org/changeset/base/352739 Log: 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. Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 26 03:09:45 2019 (r352738) +++ head/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 26 07:14:54 2019 (r352739) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909260714.x8Q7EsMM058012>