LCDproc development and user support list

Text archives Help

[Lcdproc] [PATCH] MtxOrb.c for both 0.4.5 & 0.5

Chronological Thread 
  • From: joris AT (Joris Robijn)
  • Subject: [Lcdproc] [PATCH] MtxOrb.c for both 0.4.5 & 0.5
  • Date: Wed Sep 15 18:15:01 2004

On 14 Sep 2004 at 2:02, Chris Lansley wrote:

> OK - I've now got CVS write access!

Hi Chris,

Good to see work on the very first lcdproc driver that was written.
I saw something in your code (I did not not review everything) concerning
the config stuff.

> I've got so many changes to make to the MtxOrb.c file that it would simply
> be too much for anyone to review, so I've broken the change into smaller
> changes.
> Here is my first small change - I'm combined some tidying up with the real
> reason for the change; the use of strncpy on the framebuffer.

> s = config_get_string ( sectionname, keyname, 0, NULL);
> if (s != NULL){
> + return_val = *s;
> } else {
> return_val=default_value;
> }

I don't know what this string is used for, but you should know that
strings returned by config_* functions are not your 'property'. The
buffers that contain the strings will be reused by the config stuff. That
may not be a problem if the string is only scanned once or something. If
that is so, a comment should be placed here telling that the string is
'property' of the config stuff and can only be used immediately after
this. If you assume the string is 'yours' you have introduced a problem
with the code, which should be fixed ;)
Decide what to do with this info yourself, I don't know the driver very
well and have not taken the time to review this all in context.


Joris Robijn
<joris AT>
Mobile: +31 6 288 41 964

// To understand recursion, we must first understand

Archive powered by MHonArc 2.6.18.

Top of page