svn commit: r262474 - stable/10/usr.sbin/powerd
Christian Brueffer
brueffer at FreeBSD.org
Tue Feb 25 07:55:04 UTC 2014
Author: brueffer
Date: Tue Feb 25 07:55:03 2014
New Revision: 262474
URL: http://svnweb.freebsd.org/changeset/base/262474
Log:
MFC: r261773
In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously
this could lead to the -n option effectively being ignored (in case
ac_line happened to be 0 aka SRC_AC), or other undefined behaviour.
PR: 169779
Submitted by: Alex Gonzalez <loox at e-shell.com>
Reviewed by: jhb
Modified:
stable/10/usr.sbin/powerd/powerd.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.sbin/powerd/powerd.c
==============================================================================
--- stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:40:37 2014 (r262473)
+++ stable/10/usr.sbin/powerd/powerd.c Tue Feb 25 07:55:03 2014 (r262474)
@@ -279,6 +279,7 @@ static void
acline_init(void)
{
acline_mib_len = 4;
+ acline_status = SRC_UNKNOWN;
if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) {
acline_mode = ac_sysctl;
More information about the svn-src-stable
mailing list