Author: brueffer
Date: Tue Feb 25 07:59:33 2014
New Revision: 262476
URL: http://svnweb.freebsd.org/changeset/base/262476

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/8/usr.sbin/powerd/powerd.c
Directory Properties:
  stable/8/usr.sbin/powerd/   (props changed)

Modified: stable/8/usr.sbin/powerd/powerd.c
==============================================================================
--- stable/8/usr.sbin/powerd/powerd.c   Tue Feb 25 07:57:17 2014        
(r262475)
+++ stable/8/usr.sbin/powerd/powerd.c   Tue Feb 25 07:59:33 2014        
(r262476)
@@ -274,6 +274,7 @@ static void
 acline_init()
 {
        acline_mib_len = 4;
+       acline_status = SRC_UNKNOWN;
 
        if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) {
                acline_mode = ac_sysctl;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to