Changeset 4545 for lm-sensors/branches/lm-sensors-3.0.0/lib/error.c
- Timestamp:
- 07/03/07 18:03:22 (6 years ago)
- Files:
-
- 1 modified
-
lm-sensors/branches/lm-sensors-3.0.0/lib/error.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/lib/error.c
r4464 r4545 21 21 #include <stdio.h> 22 22 #include "error.h" 23 #include "general.h" 23 24 24 25 static void sensors_default_parse_error(const char *err, int lineno); … … 44 45 }; 45 46 46 #define ERROR_LIST_LEN (sizeof(errorlist) / sizeof(char *))47 48 47 const char *sensors_strerror(int errnum) 49 48 { 50 49 if (errnum < 0) 51 50 errnum = -errnum; 52 if (errnum >= ERROR_LIST_LEN)51 if (errnum >= ARRAY_SIZE(errorlist)) 53 52 errnum = 0; 54 53 return errorlist[errnum];
