* [lm-sensors] [PATCH 3/5] sensord: Remove needless casts
@ 2009-06-15 7:49 Andre Prendel
2009-06-23 10:04 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Andre Prendel @ 2009-06-15 7:49 UTC (permalink / raw)
To: lm-sensors
This patch removes some needless casts. We don't have to cast
explicitly from void * (in C).
---
rrd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: sensors/prog/sensord/rrd.c
=================================--- sensors.orig/prog/sensord/rrd.c 2009-06-09 22:11:20.000000000 +0200
+++ sensors/prog/sensord/rrd.c 2009-06-10 11:31:02.000000000 +0200
@@ -196,7 +196,7 @@
{
(void) label; /* no warning */
if (!feature || feature->rrd) {
- struct ds *data = (struct ds *) _data;
+ struct ds *data = _data;
char *ptr = rrdBuff + data->num * RRD_BUFF;
const char *min, *max;
data->argv[data->num ++] = ptr;
@@ -306,7 +306,7 @@
static int rrdCGI_DEF(void *_data, const char *rawLabel, const char *label,
const FeatureDescriptor *feature)
{
- struct gr *data = (struct gr *) _data;
+ struct gr *data = _data;
(void) label; /* no warning */
if (!feature || (feature->rrd && (feature->type = data->type)))
printf("\n\tDEF:%s=%s:%s:AVERAGE", rawLabel,
@@ -342,7 +342,7 @@
static int rrdCGI_LINE(void *_data, const char *rawLabel, const char *label,
const FeatureDescriptor *feature)
{
- struct gr *data = (struct gr *) _data;
+ struct gr *data = _data;
if (!feature || (feature->rrd && (feature->type = data->type)))
printf("\n\tLINE2:%s#%.6x:\"%s\"", rawLabel,
rrdCGI_color(label), label);
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [lm-sensors] [PATCH 3/5] sensord: Remove needless casts
2009-06-15 7:49 [lm-sensors] [PATCH 3/5] sensord: Remove needless casts Andre Prendel
@ 2009-06-23 10:04 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-06-23 10:04 UTC (permalink / raw)
To: lm-sensors
On Mon, 15 Jun 2009 09:49:19 +0200, Andre Prendel wrote:
> This patch removes some needless casts. We don't have to cast
> explicitly from void * (in C).
> ---
>
> rrd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: sensors/prog/sensord/rrd.c
> =================================> --- sensors.orig/prog/sensord/rrd.c 2009-06-09 22:11:20.000000000 +0200
> +++ sensors/prog/sensord/rrd.c 2009-06-10 11:31:02.000000000 +0200
> @@ -196,7 +196,7 @@
> {
> (void) label; /* no warning */
> if (!feature || feature->rrd) {
> - struct ds *data = (struct ds *) _data;
> + struct ds *data = _data;
> char *ptr = rrdBuff + data->num * RRD_BUFF;
> const char *min, *max;
> data->argv[data->num ++] = ptr;
> @@ -306,7 +306,7 @@
> static int rrdCGI_DEF(void *_data, const char *rawLabel, const char *label,
> const FeatureDescriptor *feature)
> {
> - struct gr *data = (struct gr *) _data;
> + struct gr *data = _data;
> (void) label; /* no warning */
> if (!feature || (feature->rrd && (feature->type = data->type)))
> printf("\n\tDEF:%s=%s:%s:AVERAGE", rawLabel,
> @@ -342,7 +342,7 @@
> static int rrdCGI_LINE(void *_data, const char *rawLabel, const char *label,
> const FeatureDescriptor *feature)
> {
> - struct gr *data = (struct gr *) _data;
> + struct gr *data = _data;
> if (!feature || (feature->rrd && (feature->type = data->type)))
> printf("\n\tLINE2:%s#%.6x:\"%s\"", rawLabel,
> rrdCGI_color(label), label);
Agreed, thanks.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-23 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15 7:49 [lm-sensors] [PATCH 3/5] sensord: Remove needless casts Andre Prendel
2009-06-23 10:04 ` Jean Delvare
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.