[Olsr-cvs] olsrd-current/src/linux apm.c,1.18,1.19

Bernd Petrovitsch (spam-protected)
Wed Oct 24 15:44:29 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/src/linux
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15083/src/linux

Modified Files:
	apm.c 
Log Message:
* cleanup: use ARRAYSIZE, const'ifications and killed an unsed #define

Index: apm.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/linux/apm.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** apm.c	25 Apr 2007 22:08:17 -0000	1.18
--- apm.c	24 Oct 2007 13:44:26 -0000	1.19
***************
*** 71,78 ****
  
  /* ACPI related stuff */
! 
! #define ACPI_PROC "/proc/acpi/info"
! 
! static const char * acpi_info[] = 
    {
      "/proc/acpi/battery/0/info",
--- 71,75 ----
  
  /* ACPI related stuff */
! static const char * const acpi_info[] = 
    {
      "/proc/acpi/battery/0/info",
***************
*** 83,87 ****
    };
  
! static const char * acpi_state[] =
    {    
      "/proc/acpi/battery/0/status",
--- 80,84 ----
    };
  
! static const char * const acpi_state[] =
    {    
      "/proc/acpi/battery/0/status",
***************
*** 93,100 ****
  
  
! #define ACPI_BT_CNT  (sizeof(acpi_state) / sizeof(char *))
  
  
! static const char * acpi_ac[] = 
    {    
      "/proc/acpi/ac_adapter/0/status",
--- 90,97 ----
  
  
! #define ACPI_BT_CNT  ARRAYSIZE(acpi_state)
  
  
! static const char * const acpi_ac[] = 
    {    
      "/proc/acpi/ac_adapter/0/status",
***************
*** 103,107 ****
    };
  
! #define ACPI_AC_CNT  (sizeof(acpi_ac) / sizeof(char *))
  
  
--- 100,104 ----
    };
  
! #define ACPI_AC_CNT  ARRAYSIZE(acpi_ac)
  
  
***************
*** 214,218 ****
  	 units);
  
!   lainfo.using_minutes = !strncmp(units, "min", 3) ? 1 : 0;
  
    /*
--- 211,215 ----
  	 units);
  
!   lainfo.using_minutes = strncmp(units, "min", 3) ? 0 : 1;
  
    /*
***************
*** 249,253 ****
    printf("READING ACPI\n");
  
- 
    if(fd_index < 0)
      {
--- 246,249 ----





More information about the Olsr-cvs mailing list