All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Prendel <andre.prendel@gmx.de>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH v2 3/6] sensord: Refactoring of file
Date: Mon, 26 Oct 2009 20:57:12 +0000	[thread overview]
Message-ID: <20091026205712.GD4725@ubuntu> (raw)

This patch removes some needless casts. We don't have to cast
explicitly from void * (in C).
---

 prog/sensord/rrd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: sensors/prog/sensord/rrd.c
=================================--- sensors.orig/prog/sensord/rrd.c	2009-10-26 21:34:00.000000000 +0100
+++ sensors/prog/sensord/rrd.c	2009-10-26 21:34:18.000000000 +0100
@@ -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

                 reply	other threads:[~2009-10-26 20:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20091026205712.GD4725@ubuntu \
    --to=andre.prendel@gmx.de \
    --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.