Use __func__ in sensors_fatal_error() to get function name.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5674 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Andre Prendel committed 2009-03-02 13:07:23 +00:00
1 parent 9d0552984c
commit a03ec09359
4 files changed
+6 -9

No files matched your search

+1 -2
View File
@@ -201,8 +201,7 @@ char *sensors_get_label(const sensors_chip_name *name,
sensors_get_label_exit:
if (!label)
sensors_fatal_error("sensors_get_label",
"Allocating label text");
sensors_fatal_error(__func__, "Allocating label text");
return label;
}
+1 -2
View File
@@ -342,7 +342,6 @@ sensors_expr *malloc_expr(void)
{
sensors_expr *res = malloc(sizeof(sensors_expr));
if (! res)
sensors_fatal_error("malloc_expr","Allocating a new expression");
sensors_fatal_error(__func__, "Allocating a new expression");
return res;
}
+1 -1
View File
@@ -88,7 +88,7 @@ int sensors_parse_chip_name(const char *name, sensors_chip_name *res)
return -SENSORS_ERR_CHIP_NAME;
res->prefix = strndup(name, dash - name);
if (!res->prefix)
sensors_fatal_error("sensors_parse_chip_name",
sensors_fatal_error(__func__,
"Allocating name prefix");
name = dash + 1;
}
+3 -4
View File
@@ -34,8 +34,7 @@ void sensors_malloc_array(void *list, int *num_el, int *max_el, int el_size)
*my_list = malloc(el_size*A_BUNCH);
if (! *my_list)
sensors_fatal_error("sensors_malloc_array",
"Allocating new elements");
sensors_fatal_error(__func__, "Allocating new elements");
*max_el = A_BUNCH;
*num_el = 0;
}
@@ -59,7 +58,7 @@ void sensors_add_array_el(const void *el, void *list, int *num_el,
new_max_el = *max_el + A_BUNCH;
*my_list = realloc(*my_list, new_max_el * el_size);
if (! *my_list)
sensors_fatal_error("sensors_add_array_el",
sensors_fatal_error(__func__,
"Allocating new elements");
*max_el = new_max_el;
}
@@ -77,7 +76,7 @@ void sensors_add_array_els(const void *els, int nr_els, void *list,
new_max_el -= new_max_el % A_BUNCH;
*my_list = realloc(*my_list, new_max_el * el_size);
if (! *my_list)
sensors_fatal_error("sensors_add_array_els",
sensors_fatal_error(__func__,
"Allocating new elements");
*max_el = new_max_el;
}