libsensors4: Drop sensors_strip_of_spaces
PATCH 1/7 libsensors4: Drop sensors_strip_of_spaces
Drop sensors_strip_of_spaces. There's no rationale for stripping trailing spaces of bus names and nothing else.
--- lib/conf-parse.y | 3 +-- lib/general.c | 8 -------- lib/general.h | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-)
lib/conf-parse.y +1 -2
@@ -298,8 +298,7 @@ bus_id: NAME ; adapter_name: NAME - { sensors_strip_of_spaces($1); - $$ = $1; } + { $$ = $1; } ; function_name: NAME
lib/general.h +0 -3
@@ -33,9 +33,6 @@ void sensors_add_array_el(const void *elvoid sensors_add_array_els (const void *els,int nr_els,void *list,int *num_el,int *max_el,int el_size); -/* Strip a string of all terminating spaces */ -void sensors_strip_of_spaces (char *name); -#define ARRAY_SIZE (arr) (int)(sizeof(arr) / sizeof((arr)[0]))#endif /* LIB_SENSORS_GENERAL */
lib/general.c +0 -8
@@ -83,11 +83,3 @@ void sensors_add_array_els(const void *ememcpy (((char *)*my_list) + *num_el * el_size, els, el_size * nr_els); *num_el += nr_els; } - -/* Strip a string of all terminating spaces */ -void sensors_strip_of_spaces (char *name) -{ -int i; -for (i =strlen (name) -1 ; i >=0 && name[i] =' ' ; i--); - name[i +1 ] ='\0' ; -}
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors