From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v2 2/2] libsensors: Use __func__ in
Date: Mon, 23 Feb 2009 10:37:57 +0000 [thread overview]
Message-ID: <20090223113757.69355d11@hyperion.delvare> (raw)
In-Reply-To: <20090223084402.GA4511@ubuntu>
Hi Andre,
On Mon, 23 Feb 2009 09:44:03 +0100, Andre Prendel wrote:
> Hi Jean,
>
> this is an updated version of the patch from 20.02. According to your
> hint I have patched conf-parse.y and not conf-parse.c.
>
> This patch unifies sensors_fatal_error() calls. Uses __func__ to get
> the function name.
>
> Andre
>
> ---
> access.c | 3 +--
> conf-parse.y | 3 +--
> data.c | 2 +-
> general.c | 7 +++----
> 4 files changed, 6 insertions(+), 9 deletions(-)
>
> diff -urp lm-sensors-dev/lib/access.c my-sensors/lib/access.c
> --- lm-sensors-dev/lib/access.c 2009-02-19 23:17:15.000000000 +0100
> +++ my-sensors/lib/access.c 2009-02-22 17:57:28.000000000 +0100
> @@ -201,8 +201,7 @@ char *sensors_get_label(const sensors_ch
>
> 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 -urp lm-sensors-dev/lib/conf-parse.y my-sensors/lib/conf-parse.y
> --- lm-sensors-dev/lib/conf-parse.y 2009-02-16 14:12:50.000000000 +0100
> +++ my-sensors/lib/conf-parse.y 2009-02-22 18:02:42.000000000 +0100
> @@ -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 -urp lm-sensors-dev/lib/data.c my-sensors/lib/data.c
> --- lm-sensors-dev/lib/data.c 2009-02-19 23:17:15.000000000 +0100
> +++ my-sensors/lib/data.c 2009-02-22 17:57:28.000000000 +0100
> @@ -88,7 +88,7 @@ int sensors_parse_chip_name(const char *
> 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 -urp lm-sensors-dev/lib/general.c my-sensors/lib/general.c
> --- lm-sensors-dev/lib/general.c 2009-02-19 23:17:15.000000000 +0100
> +++ my-sensors/lib/general.c 2009-02-22 17:57:28.000000000 +0100
> @@ -34,8 +34,7 @@ void sensors_malloc_array(void *list, in
>
> *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
> 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 *e
> 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;
> }
Patch looks good, however I can't apply it right now because SVN is
frozen for the release of lm-sensors 3.1.0 at the end of the week. Your
patch will be applied after the release.
BTW, are you sure you don't want an SVN account? You're sending good
patches, and you might as well apply them yourself...
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2009-02-23 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 8:44 [lm-sensors] [PATCH v2 2/2] libsensors: Use __func__ in Andre Prendel
2009-02-23 10:37 ` Jean Delvare [this message]
2009-02-23 11:18 ` Jean Delvare
2009-03-02 10:52 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090223113757.69355d11@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.