Show
Ignore:
Timestamp:
07/03/07 18:03:22 (7 years ago)
Author:
khali
Message:

Add some more warning flags, and fix these warnings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/lib/error.c

    r4464 r4545  
    2121#include <stdio.h> 
    2222#include "error.h" 
     23#include "general.h" 
    2324 
    2425static void sensors_default_parse_error(const char *err, int lineno); 
     
    4445 }; 
    4546 
    46 #define ERROR_LIST_LEN (sizeof(errorlist) / sizeof(char *)) 
    47  
    4847const char *sensors_strerror(int errnum) 
    4948{ 
    5049  if (errnum < 0) 
    5150    errnum = -errnum; 
    52   if (errnum >= ERROR_LIST_LEN) 
     51  if (errnum >= ARRAY_SIZE(errorlist)) 
    5352    errnum = 0; 
    5453  return errorlist[errnum];