diff --git a/lib/conf-parse.y b/lib/conf-parse.y index 3df1f808..30453eed 100644 --- a/lib/conf-parse.y +++ b/lib/conf-parse.y @@ -298,8 +298,7 @@ bus_id: NAME ; adapter_name: NAME - { sensors_strip_of_spaces($1); - $$ = $1; } + { $$ = $1; } ; function_name: NAME diff --git a/lib/general.c b/lib/general.c index f032d494..2900bfff 100644 --- a/lib/general.c +++ b/lib/general.c @@ -83,11 +83,3 @@ void sensors_add_array_els(const void *els, int nr_els, void *list, memcpy(((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'; -} diff --git a/lib/general.h b/lib/general.h index 73e5e620..e4f9c4d1 100644 --- a/lib/general.h +++ b/lib/general.h @@ -33,9 +33,6 @@ void sensors_add_array_el(const void *el, void *list, int *num_el, void 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 */