All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v2 5/7] sensord: Refactoring of loadConfig()
Date: Wed, 13 May 2009 08:21:47 +0000	[thread overview]
Message-ID: <20090513102147.70b77b7b@hyperion.delvare> (raw)
In-Reply-To: <20090511160411.GF17530@ubuntu>

On Wed, 13 May 2009 10:09:43 +0200, Andre Prendel wrote:
> On Tue, May 12, 2009 at 09:43:20PM +0200, Jean Delvare wrote:
> > On Mon, 11 May 2009 18:04:11 +0200, Andre Prendel wrote:
> > > This patch does some refactoring of the loadConfig()
> > > function.
> > > 
> > > * Simplifying the conditions makes code flow clearer and eliminates
> > > long lines (> 80 chars).
> > > * Removed useless stat() call.
> > > * Return -1 in error case, instead of several positive values (never defined).
> > > 
> > > Changes in v2:
> > > 
> > > Blank line before the first #include.
> > > Fix typo.
> > > Bring back logging (reload configuration).
> > > Consistent error messages.
> > > Drop reading configuration from stdin.
> > > Fix logging (if fopen() fails).
> > > Cleanup sensors before reloading configuration.
> > > Fix compile warning.
> > > Don't print error value if reloadLib() fails.
> > 
> > Looks almost OK, just one minor issue:
> > 
> > > ---
> > > 
> > >  lib.c     |   74 +++++++++++++++++++++++++++++++-------------------------------
> > >  sensord.c |    4 +--
> > >  2 files changed, 40 insertions(+), 38 deletions(-)
> > > 
> > > Index: quilt-sensors/prog/sensord/lib.c
> > > =================================> > > --- quilt-sensors.orig/prog/sensord/lib.c	2009-04-26 22:11:03.000000000 +0200
> > > +++ quilt-sensors/prog/sensord/lib.c	2009-04-26 22:13:09.000000000 +0200
> > > (...)
> > > + 	/* Load default configuration. */
> > > + 	if (!cfgPath) {
> > > + 		if (reload) {
> > >  			sensorLog(LOG_INFO, "configuration reloading");
> > > -			sensors_cleanup();
> > > +  			sensors_cleanup();
> > 
> > You're adding leading white spaces!
> 
> Hi Jean,
> 
> I really cannot see any whitespaces. What do you mean?

I mean:

<minus><tab><tab><tab>sensors_cleanup();
<plus><space><space><tab><tab><tab>sensors_cleanup();

The two spaces shouldn't be there. As a matter of fact, the effective
content of this line doesn't change, so it shouldn't show up in the
diff... unless there are invisible whitespace changes.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2009-05-13  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 16:04 [lm-sensors] [PATCH v2 5/7] sensord: Refactoring of loadConfig() Andre Prendel
2009-05-12 19:43 ` Jean Delvare
2009-05-13  8:09 ` Andre Prendel
2009-05-13  8:21 ` Jean Delvare [this message]
2009-05-13  9:07 ` Andre Prendel
2009-05-13  9:12 ` 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=20090513102147.70b77b7b@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.