summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Prendel <andre.prendel@gmx.de>2009-03-02 13:07:23 +0000
committerAndre Prendel <andre.prendel@gmx.de>2009-03-02 13:07:23 +0000
commita03ec0935945e1054044ad4387b1e92dc539fe5f (patch)
tree33be4e4a3ccf072104a39dd8b440438715a39d8e
parent9d0552984c138cc9535161e51112dd39af8b76b8 (diff)
downloadlm-sensors-git-a03ec0935945e1054044ad4387b1e92dc539fe5f.tar.gz
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
-rw-r--r--lib/access.c3
-rw-r--r--lib/conf-parse.y3
-rw-r--r--lib/data.c2
-rw-r--r--lib/general.c7
4 files changed, 6 insertions, 9 deletions
diff --git a/lib/access.c b/lib/access.c
index af296abc..01c345ea 100644
--- a/lib/access.c
+++ b/lib/access.c
@@ -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;
}
diff --git a/lib/conf-parse.y b/lib/conf-parse.y
index 6641253a..ea6be705 100644
--- a/lib/conf-parse.y
+++ b/lib/conf-parse.y
@@ -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;
}
-
diff --git a/lib/data.c b/lib/data.c
index 54e3fdce..4f0072eb 100644
--- a/lib/data.c
+++ b/lib/data.c
@@ -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;
}
diff --git a/lib/general.c b/lib/general.c
index ef05f0d1..9d50bb02 100644
--- a/lib/general.c
+++ b/lib/general.c
@@ -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;
}